android

Android Battery in SDK

Is there a way to get battery information from the Android SDK? Such as battery life remaining and so on? I cannot find it through the docs. ...

Getting installed app size

I'm trying to figure out how to get the size of an installed app. What's already failed: - new File('/data/app/some.apk') - reports incorrect size - PackageManager.getPackageSizeInfo(String packageName, IPackageStatsObserver observer) - is @hide and relies on some obscure IPackageStatsObserver for result so I can't call it via reflection...

Android Get Local File Bytes

I'm trying to get a byte array of an image saved locally on the phone. I'm using the code: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.upload); // Look in the Device startActivityForResult(new Intent(Intent.ACTION_PICK, android.provider.MediaSto...

How to scroll views whithn view in android?

What I want to do is to scroll view after listening a button. Simply user taps button and view is scrolled to specific id below. I tried to use scrollto and scrollby passing as an argument reference to object to which I want to scroll with no effect. Anyone solved this problem yet? ...

Android version of AVAudioPlayer's averagePowerForChannel

Does Android have a similar method to the iPhone AVAudioPlayer's averagePowerForChannel? I want to get an average reading of the amplitude of as a value. ...

Android "Hello, MapView" Tutorial - Map Tiles Do Not Load

I am new to Android software development and new to this site. I am hoping someone might have some experience with the problem I am having. I've been following the Hello, MapView tutorial in order to not only learn the Android framework, but also the Google Maps library. I've tried my best to implement things exactly as the tutorial h...

How do I show a dialog after the Thread has encountered an uncaught exception?

I want to detect when an uncaught exception has happened in my Android app. Once detected, I want to display a confirmation dialog How do I get this confirmation dialog to display? When I tried various techniques, the UI is unresponsive and appears to be frozen. My code responds to this: //new CatchAllExceptionHandler(this) is my cust...

Android kernel compile and test with Android Emulator

Has anyone successfully compiled the android kernel and tested it in the Android emulator, and if so is there anything that special that needs to be done? Documentation for the SDK is excellent, however documentation for compiling the kernel and setting up a custom machine in the emulator has been hard for me to find. ...

Android Webkit in background

Is there a way to get webkit running in the background , or even small enough for the user not to know that the webkit browser is running? Basically i want to use this to have java and javascript integration while using the android UI. ...

"SD Card" permission appears on 2.0 devices?

Hi, I wrote an Android application. These are the permissions I requested: INTERNET ACCESS-COARSE-LOCATION ACCESS-FINE-LOCATION ACCESS-NETWORK-STATE CHANGE-NETWORK-STATE On 1.5 devices, it looks fine. I tried on a 2.0 device, and it also shows an additional permission when installing the app: SD CARD READ / WRITE is that just co...

Android: getting image locations

Hi, am looking for a way to find images on the SD card, or at least images taken by the camera. The ideal solution would be getting a collection of file paths or URIs for the images. I guessing you can do this through the MediaStore I just can't figure out how. Thank you ...

Dial Number Without Prompt

I'm trying to write a function for the Android Platform that will allow me to call 911 without any sort of prompt. I have already added the permission "android.permission.CALL_PRIVILEGED" I just need a function that will dial 911 at the press of a button in my options menu. ...

Locating local hospitals in android

I want to be able to plot every hospital within 10 miles of my current location on the map in Android. I've already started with this code as a base (http://android-er.blogspot.com/2009/11/androidlocation-with-zoom-level-control.html) I just need to plot the locations of hospitals without switching to another screen. ...

ANDROID: if WiFi is enabled AND active, launch an intent ...

This is what I would like to do : => IF WiFi is enabled AND active, launch an intent (in fact it's a WebView that gets its content=>the instructions of my app on the web) => IF NOT, then I would launch another intent so that I don't show a WebView with "Web page not available ... The Web page at http://www.mywebsite.com might be tempor...

imageview web imageresource.

I want to read image from web ex. http://www.abc.com/image1.jpg and dynamic set to imageview component. how can i do it? any good tutorial ?? Thanks in advance. ...

Start system activity picker even when a default one is set

Hi, Is there a way to show the system activity picker even when a default activity for the intent is set? I'm aware there is an ACTION_CHOOSER, but it does not give user a second chance to change the default settings. Thanks ...

Overriding AnalogClock in Android

Hi all, I want to create an AnalogClock that can display a preset time, given as a parameter. And I want to draw between the background and the hands. I want to paint the area between the minute-hand and location of the hour-hand at a preset future time. This is to let the user see how much time remains for the current activity. I tho...

Android - Activity from a service?

I am extending the IntentService class to run a background service on Android. The service starts after bootup immediately. I want to pop-up a user input box from this service periodically. So, I tried calling an Activity from the service, but it doesn't help. The dreaded box of Force Close appears and the service dies. Can anybody sugg...

Android NDK: Autogenerate function declarations?

I am trying to use a pre-existing native C library in my android project.. The library builds just fine with the NDK tools... Now what I've come to understand is that I cannot just call into the library, but my library needs to include jni.h and add specific function declarations, like for example: JNIEXPORT jint JNICALL Java_com_MultP...

Run without debugging in eclipse

When I run my app on my phone from eclipse, it always runs in debug. This has only recently started to happen. I guess I must have inadvertently changed a preference or something, but can't work out what. Does anyone know how I can switch it back so I can run without debugging? Thanks in advance TAO ...