android

Android - Help with ANR and traces.txt

My app crashes with an ANR while scrolling in a spinner. I implemented many spinners in different apps and this is the first time i get this ANR. I would appreciate any help in deciphering the traces.txt DALVIK THREADS: "main" prio=5 tid=3 NATIVE | group="main" sCount=1 dsCount=0 s=0 obj=0x40018e70 | sysTid=896 nice=0 sched=0/0 handle...

How to handle a webview dialog popup?

I'm displaying a webpage in a WebView and on the webpage, there is a button. When you click the button, a confirmation dialog is supposed to popup, but it doesn't show in my WebView. It does popup if I go to the same webpage in the android browser. Anyone know how to handle popup dialogs coming from a webpage inside your WebView? bro...

What happens on Activity.finish() with AsyncTask still running in background?

What happens on Activity.finish() with an AsyncTask still running in background? Does it just pop the Activity off the Activity Stack, but wait to destroy the Activity object until the AsyncTask fully completes (since the AsyncTask is an inner class of my Activity)? Also, would it act any differently if the AsyncTask were a public, non...

How to add the coding for displaying the address when a particular set of latitude and longitude is selected into the following codes?

package net.learn2develop.PopularAttractions; import java.io.IOException; import java.util.List; import java.util.Locale; import com.google.android.maps.GeoPoint; import com.google.android.maps.MapActivity; import com.google.android.maps.MapController; import com.google.android.maps.MapView; import android.location.Address; import and...

Help with getParent() downcast.

I'm learning android/java and have this example code I can't get to work: OnRatingBarChangeListener l = new OnRatingBarChangeListener() { public void onRatingChanged(RatingBar ratingBar, float rating, boolean fromTouch) { Integer myPos=(Integer)ratingBar.getTag(); RowModel model=getModel(myPos); model.rating = rating; Linea...

Is there a repo where you can download android virtual devices?

Does anyone know, if vendors provide or if there is a site where one could download AVD profiles for existing android devices on the market so you can run your apps in the emulator and basically see how they will run on said devices? I know it's pretty easy to create a new device but it'd be great if one could just download the config f...

Communicating with remote server in Android

Hi, As part of the college mini-project, I am developing a micro-blogging platform for Android. I am planning to use Django framework in python to handle the communication between Android and remote server so as to make database API independent. I heard its best practice to use HTTP methods for the communication. Which is the best site/...

How to limit the number of dropdown items visible at a time on screen in AutoCompleteTextView ?

I am using AutoCompleteTextView and want to limit the number of dropdown items visible at a time on screen. Currently it fills up the screen but can i limit it to say 2 items with a scroll bar for displaying more. ...

wrap from last screen to first screen in android Launcher2

hi, I'm learning java and android. and I've been looking at trying to wrap the last screen to the first screen in the android Launcher2. I've tried googleing, and searching here, but there really isnt much information about the launcher2 source...I've been modifying the workspace.java file, but there has been minimal effect. no wrap arou...

Send data from Service to Widget on Android.

I am writing a widget on Android 1.6 that shows the minutes that a person has used on the current month. The way I have it setup is by having a service that listens to the state of the phone and when the phone is picked up, it starts the timer and when the person hangs up, ends a timer. I would like to send this variable(long duration) ...

how to recieve text sms to specific port..

recieve text sms to specific port.. I have been looking for an answer to this question but but to no avail. This question has been popped a few times but nobody seems to have a clear answer. my code is as follows.. --MANIFEST FILE-- <receiver android:name=".SMSRecieve" android:enabled="true"> <intent-filter> <action android:name="...

How can I get the google username on Android?

I've seen references to using the AccountManager like http://stackoverflow.com/questions/2245545/accessing-google-account-id-username-via-android but it seems like it's for grabbing the authtoken? I just need access to the username, no passwords or any auth tokens. I'm using android 2.1 sdk. ...

How can specific the layout_width and layout_height of a Framelayout which fits an image

Hi, I have an image which is 80px X 50 px, and I need to place that in one of the child of a FrameLayout, how can I specific the layout_width and layout_height of a Framelayout which fits an image without scaling it? I know there is a layout_height="wrap_content" layout_wight="wrap_content" for FrameLayout, but I can't use it, since th...

Fault address when malloc/free pthread_t across threads

Fault address occurred when i malloc pthread_t to save a newly created thread id and free it in another thread. Codes as follows: typedef struct _TaskInfo { // int dummy_int; pthread_t tid; } TaskInfo; void* dummy_task(void* pArg) { free(pArg); return NULL; } void create_task() { TaskInfo *pInfo; pthread_attr_...

No GPS Update retrieved? Problem in Code?

Hello mates, I've got a serious problem with my GPS on my Nexus One: I wrote a kind of hello world with GPS, but the Toast that should be displayed isn't :( I don't know what I'm doing wrong...maybe you could help me getting this work. Here's my code: package gps.test; import android.app.Activity; import android.content.Context; impor...

Remote servicve

Hi, I have preperd a remote service, i would like to know if it's possible somehow via this service to call another activities? coz usually what ive seen so far, is how external apps calling the remote service and using it's methods, but i want vice versa.. that the remote service will call an external app's activity, thanks, moshik. ...

Should i use remote or local service for this scenario?

Hi, I need to build some kind of listener, now this listener suppose to run activies of diffrentz appz , i want this listener to be as a service that will run the appropriate activity, should i make it as a remote service or local service(for this i need some app to hold it - make sense?) what will fit in? thanks, ray. ...

Resource or documentation detailing all the default icons on the Android?

Anyone know of any resource or documentation detailing all the default icons used on the standard Android and where those icons are used throughout the device etc? I realise you can download the default set off the Android development site however there doesn't seem to be any documentation for them. Any help would be very much apprecia...

Communication between Android Java and Phonegap Javascript?

I believe that it's possible to call Java methods from (PhoneGap) Javascript. Anyone knows how to do that?? (I know how to do it by changing the source code of PhoneGap, but I'd avoid that) ...

Is there a common color file including all common colors for Android application development?

It is a common thing to add a color name and a color RGB value in a config xml file for developing an Android application. It is boring sometimes for example, when I want to add color pink, I had to find some tool to show me what the exact RGB value for it and then fill it in that xml file. I am wondering is there any predefined color f...