android

Button inside MultiAutoCompleteTextView Android Development

Hi, Anyone know how could I put Button inside my multiAutoCompleteTextView instead of a spannableString ? ...

Android:How can i change the color of the text of the ListAdapter?

The default color of the text is white. Let's say if i want to change the color, then how can i do it? Any clue? ...

android get real path by Uri.getPath()

Hi, I'm trying to get image from gallery. Intent intent = new Intent(); intent.setType("image/*"); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(intent, "Select picture"), resultCode ); After I returned from this activity I have a data, which contains Uri. It looks like: content://media/ex...

Find package name for Android apps to use Intent to launch Market app from web

I'm creating a mobile website that will include a page from which people can download relevant apps that we recommend. I've found instructions for creating the links to launch the Market but this assumes that you are the developer of the app in question and know the exact package name. Is there any way to get the package name, other th...

How can i check whether an android device is connected to the web?

How would i know whether my device is connected the web or not? How can i detect connectivity? Any sample code? ...

How to scroll to the new added item in a ListView

Hi all My application show a ListView with a button which allow user to add an element. When the user clicks on this button, another Activity is started to allow user to populate the new element. When the add is finished, we return to the previous Activity with the ListView and I would like to scroll to the new element. Note that this ...

IntelliJ 9 and Android - Filtering LogCat

Hello, Having got fed up with Eclipse I switched my IDE over to IntelliJ and so far have not looked back (Granted only been using it for a day or so). I never used ADT drag and drop layout editing either preferring to code my XML layouts by hand or in DroidDraw, so this was never a problem. However, one thing I do miss is the ability t...

How can I fix this touch event / draw loop "deadlock"?

Just want to start out by saying this seems like a great site, hope you guys can help! I'm trying to use the structure laid out in LunarLander to create a simple game in which the user can drag some bitmaps around on the screen (the actual game is more complex, but that's not important). I ripped out the irrelevant parts of LanderLande...

Android - When to use Service

This question is related to my previous question: http://stackoverflow.com/questions/2786720/android-service-ping-url So I have an Android app that on the click of a button, opens up a web page. Now, in the background I want to call another http url for gathering stats. My question is does this have to be a service? I know a service i...

Supress the Soft Keboard when an activity loads... yet again

this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); Same problem that I've read on other posts. I don't want the soft keyboard to pop up when the Activity loads. The above code snippet works, however my View no longer scrolls up so that the User can still see the EditText. It scrolls without t...

Last modification time of a Contact on Android

Hi guys. I need to get the last modification time of a Contact: I try to use ContactsContract.Contacts.CONTACT_STATUS_TIMESTAMP, but in my emulator it always returns 0. Any hint? Thanks, bye. ...

cookies required in FBConnect in android?

In My FBLoginActivity there is a error message "cookies required" with yellow background has shown. how to remove it or how can i rectify it? ...

Any way to override the managedQuery method to include a limit param when using a self-made content provider?

I've built my own content provider and I've run into an instance where I need to execute a query and include a limit param. The method call to managedQuery doesn't include this param and there fore I see no way to implement this w/o somehow overriding the managedQuery method? I've created a second query method in my content provider wh...

Android Virtual Device freezing during its loading

Hello, I've downloaded Eclipse Classic 3.5 Galileo, the last version of Android SDK, downloaded and installed Eclipse Android 1.6 platform. I've created first (and the only) AVD with Android 1.6 and the default skin. The log may show more: I've filtered only neccessary messages (warnings, errors). -http://www.clipboard.cz/63c As you ca...

Stack memory in Android

I'm writing an app that has a foreground service, content provider, and a Activity front end that binds to the service and gets back a List of objects using AIDL. The service does work and updates a database. If I leave the activity open for 4-8+ hours, and go to the "Running Services" section under settings on the phone (Nexus One) an ...

Is it possible to dither a gradient drawable?

I'm using the following drawable: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <gradient android:startColor="@color/content_background_gradient_start" android:endColor="@color/content_background_gradient_end" ...

capturing another activity's screen in android

is it possible to have a service (A) which will launch an activity (B) and then periodically capture B's screen? also, is it possible to send onTouch events from A to B? basically, i'd like to make a bot which would use an application so i don't have to. i guess it's not possible but had to ask. ...

Pick an image from the Gallery

I have seen a lot of posts about this, and it seems like the code below should work. I have created an SD Card image and added it to the emulator (and that works fine). Intent intent = new Intent(Intent.ACTION_PICK); intent.setType("image/*"); //intent.setAction(Intent.ACTION_GET_CONTENT); startActivityF...

Eclipse + Android + JUnit test references android.os class = NoClassDefFoundError

I have a custom timer that extends android.os.CountDownTimer. I have a test in the test project (standard Android/Eclipse project config) that tests the custom Timer. When I run this test, I get: java.lang.NoClassDefFoundError: android/os/CountDownTimer   at java.lang.ClassLoader.defineClass1(Native Method)   at java.lang.ClassLo...

android: customized text selector

I wanted to design a customized text selector that changed the text color when user clicks the TextView. But got the following error: java.lang.RuntimeException: Unable to start activity ComponentInfo{}: android.view.InflateException: Binary XML file line #55: Error inflating class here is what I have: drawable/text_selector.xml ...