Tag: android

Android exit sqlite shell

I’m using sqllite3 on MacOSX’s adb shell to view my application database using: #sqlite3 mydb.db SQLite version 3.5.9 Enter “.help” for instructions sqlite> quit …> .quit …> After I wrongly typed the quit command above, instead of the .quit for example, the shell goes into the …> prompt where none of the known commands seem […]

Top-most and Bottom-most Horizonal Divider does not show up in ListView

I am using a ListView. But the top-most and bottom-most horizontal bar does not show up. Any idea why? I am using this: android:divider=”@android:drawable/divider_horizontal_bright”

How to check network connection enable or disable in WIFI and 3G(data plan) in mobile?

I am developing an android application,In my application,I want to check network connection,like i want to check network connection in wifi and 3G(like Indians mostly like data plan in mobile),how to check network in wifi and 3G.naybody knows,please give some idea about that. Thanks

How can I use the mobileweb facebook connect API with phonegap?

I’m trying to integrate Facebook into my Phonegap application that is going to be deployed for both Android and Blackberry devices. As there is only a plugin available for Android I need to go down the standard Facebook connect mobileweb route. However I cannot redirect back to file:// (Phonegap) so I’m wondering if anybody has […]

resize image from file

I am uploading an image to a server and before that happens, I would like to resize the image dimensions. I get the image with a URI like this: Constants.currImageURI = data.getData(); this is the call to upload the image: String response = uploadUserPhoto(new File(getRealPathFromURI(Constants.currImageURI))); public String uploadUserPhoto(File image) { DefaultHttpClient mHttpClient; HttpParams params = […]

Android 4.0.4 MediaPlayer prepare issue using RTSP urls

I am experiencing an odd issue with a video streaming application I am working on. The actual streaming of video/audio is working fine on all of my test devices. However, on seemingly any device 4.0+, when using an RTSP URL, prepare() returns instantly (this causes an issue providing proper feedback to the users while a […]

Starting an Android Activity from a static method

I want to start an activity from a static java method on an android device. I do not have any context or anything passed as parameter to the static function. For starting the activity I must call “startActivity” with the current running method as “this” pointer. So is there a way to get the current […]

How to detect whether android app is running UI test with Espresso

I am writing some Espresso tests for Android. I am running in the the following problem: In order for a certain test case to run properly, I need to disable some features in the app. Therefore, in my app, I need to detect whether I am running Espresso test so that I can disable it. […]

Authenticate my “app” to Google Cloud Endpoints not a “user”

What I’m trying to do is to authenticate my Android app to the Google Cloud Endpoint. Basically the endpoints should only allow my Android app to access the methods and nothing else. I have done these things – Create a client id using my SHA1 value in Eclipse in the Google Cloud Console. Create a […]

Solving “Package manager has died” RuntimeException

I have an Android app that should list all installed apps on a device (no root). I have tried both getInstalledApplications(0) and getInstalledPackages(0) methods of PackageManager, but on some devices, which do apparently have too many apps installed, I’m getting “Package manager has died” RuntimeException (I receive them via error reporting service of Google Play). […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.