android

Application crashes after adding a RadioGroup in Mark L. Murphy's "A Fancier Form" tutorial

I'm going through the "A Fancier Form" chapter in Mark Murphy's "Android Tutorials" book (1st edition) and I can't get past step#2: Add a RadioGroup. The application compiles and installs on emulator and phone with no errors but when I try to run it I get the: Sorry! The application LunchList (process apt.tutorial) has stopped unexpecte...

Is there a way to include a library based on API Level or an if statement for Android

Hi, So I have a API issue. So i am creating a class that utilizes AndroidHttpClient to download Bitmap images from my server. Problem is, it's API Level is 8 "http://developer.android.com/reference/android/net/http/AndroidHttpClient.html" and I want this to be used FROM API 1 and above, now i know i can use DefaultHttpClient (the API i...

Back button and last activity

Hi all, My app chains some activities. if you press the back button, you go back through old activities then you suddenly quit the application ! so I need to show a message like "do you really want to exit" if it's the last activity on stack I know how to override the back button but i can't figure how to know how many activity are ...

Video turn power off phone problem

I have videoView , i load the video from the sdcard on method oncreate(), when i turn power off the phone and then turn the power on , the video is black screen , Any one knows why ? and what method is the activity call in this case onResume , onRestart ,... or what ? Thanks in Advance. ...

Android error: HeapWorker is wedged... BinderInternal$GcWatcher

My Android app is crashing with the following error: ERROR/dalvikvm(7051): HeapWorker is wedged: 10037ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V So it looks like the GCWatcher is taking > 10s to finalise. This happens while an AsyncTask is retrieving/passing data from a remote server via http. It d...

What kills an Android AsyncTask?

PrintStatusTask parses the contents of a gmail inbox looking for various items of interest to report on. But a new AsyncTask is created for each PrintStatusTask().execute() according to the debugger. Shouldn't these tasks die on exit? Do they have to be killed manually? public class Controller extends Activity { ... private bool...

The famous scroll table problem...

After recently having to implement a scroll-table in JavaScript (i.e. a table that scrolls but leaves the headers visible so that one can easier visually associate cells with the correct columns) I now seem to bump into this very same problem on Android! I have a longish TableLayout which I therefore need to put into a ScrollView. I wou...

SSLException when server cert uses SAN (Subject Alternative Name)

I'm trying to establish a https connection using the classes in org.apache.http.*. As part of my setup, I'm using the BrowserCompatHostnameVerifier() class which states: The hostname must match either the first CN, or any of the subject-alts. A wildcard can occur in the CN, and in any of the subject-alts. When I hit a server who's...

How-to create a clickable Button with a ShapeDrawable?

Hello, I'm trying to draw a shape on a Canvas and get information about the clicks that the user performs on that Canvas. I created a class which extends the Button class. class CustomDrawableButton extends Button { private final ShapeDrawable mDrawable; int x = 50; int y = 50; int width = 30; int height = 30; ...

Package Name change results in permanent permissions problem

I mistyped the package name when I created my android project, and it took me a while to notice. I used Eclipse's Rename function on the package to change it, and sort out all the references. I've updated the Manifest, and manually checked every file for any references to the old package name. However when I launch the app (it's a live w...

Ongoing notifications

I am trying to create a notification that will appear in the "ongoing" area of the notification bar (like WeatherBug). Here is the code that I am using: PendingIntent intent = PendingIntent.getActivity(lastContext, 0, notifyIntent, PendingIntent.FLAG_UPDATE_CURRENT | Notification.FLAG_ONGOING_EVENT | Notification.FLAG_NO_CLEAR) From ...

Android contact picker and search

I have an app which allows the user to select a contact via an ACTION_PICK Intent using code similar to this example. This works fine, but the user can press the Search key and choose a contact from the search results. In this case, the picker brings up the contact view where the only actions available are email, call, etc. I'd expect ...

What's the method to access whatever child item is displayed in an Android spinner, instead of just waiting for an onItemSelected() event?

As the title says, what is the method to access which item is displayed in an Android spinner, so I can have multiple spinners, then wait on a button click? Thanks! ...

Setting camera image size in Android.

At the moment I am attempting to set my camera on my Motorola Droid phone to take an image that matches the size of my screen (854 x 480 pixels), and I am attempting to accomplish via the parameters for the camera as such: Camera.Parameters parameters = this.mCamera.getParameters(); Log.i(TAG, "CAMERA SIZE: (" + this.mCameraView.getWidt...

send email from android with embedded img isn't working

From an Android app, I'm trying to send an email with an HTML body with an embedded img. From what I've read, the following should work. The email is received with HTML bold tags working correctly etc, however the img is replaced with [OBJ]. My logging tells me that I do indeed get a Drawable with the correct dimensions etc, so it see...

Android Licensing Service - LicenseChecker always times out

Hey everybody, i'm implementing the licensing service in one of my apps. I have set the test response to LICENSED. Anyway it always invokes the dontAllow() function. Locat sais: 08-17 23:44:53.956: INFO/LicenseChecker(479): Binding to licensing service. 08-17 23:44:54.556: INFO/LicenseChecker(479): Calling checkLicense on service for de...

arm-eabi-gcc: Internal error: Segmentation fault (program cc1)

hello all, I am building new android system on Ubuntu 10.4 64bits, while building I got this error: This command caused the error, prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc -mthumb-interwork -Ibionic/libc/private -o out/target/product/generic/obj/lib/crtbegin_dynamic.o -c bionic/libc/arch-arm/bionic/crtbegin_dynamic....

How do I get contacts and text message info

How would I use the SQL DB info and such to get info about contacts and text messages? ...

why disable virus scan when installing android sdk - won't it render the computer vulnerable during that window?

"Important: Before you install SDK components, we recommend that you disable any antivirus programs that may be running on your computer" Just wondered why and whether it will render the computer vulnerable during that window... ...

Why am I getting "call to OpenGL ES API with no current context" ?

Hello, I am new to both openGL and android development so please forgive me if my question is very trivial. I am trying to build a simple little app that takes input from the user in three EditTexts representing a 0 - 100% value for each component of a RGB color to be displayed in a GLSurfaceView. The catch is that I need this to use o...