android

Android - Widget application communication

From a widget when I relaunch an activity which resides in home screen after pressing home button, none of the events of that activity is getting called in HTC hero. It is working as expected in 1.5 emulator. How to solve this issue? ...

Android Listview ArrayAdapter example

I am suing cusotm row view in Listview widget. i am having getview method in my implementation. What i want that i want to hide divider image of 2nd row how can i do it ? ...

How to create a transparent textview on click over the running screen

How to create a transparent textview on click at the bottom of the running screen. Thanks in advance.... ...

Android:Android SDK and AVD Manager doesn't launch after did SDK upgrade?

Hi folks, I have Android development eclipse setup on Mac OS X. I recently did Android SDK upgrade from 1.5 to available versions such as 1.6, 2.0.1 and 2.1 and docs. After did upgrade, automatically restarted my Macbook and installed all new versions. After this, when i try to launch "Windows->Android SDK and AVD Manager", it doesn't l...

How to run Android instrumentation tests from the command line (in Kubuntu)?

We are able to run instrumentation tests of Android from the command line on Windows by launching: adb shell am instrument -w <package.test>/android.test.InstrumentationTestRunner This gives us good results. Using the same architecture, we are unable to run the same in Kubuntu. We have the same setup in Kubuntu. Can someone l...

android bluetooth discovery: ACTION_FOUND happening after ACTION_DISCOVERY_FINISHED

I am implementing Bluetooth support via implementing a task which searches for devices in the background and provides a list when the search is complete. However, this list occasionally contains a No devices found entry (added only when ACTION_DISCOVERY_FINISHED is received with no devices already in the list) before listing other device...

Truncated string in android spinners

On the iPhone, if an option is too long for the area, instead of wrappeing you get a "..." at the end of the "drop down" and the user will know there is more text than is shown. I want to recreate this with android but am new to it so cant see how. I want the heights of "rows" in my layout to be uniform hence not able to wrap the text....

how to use the opengl interface in android ndk

if i wanna use the opengl interface in android ndk, then will it be possible to show me a simple tutorial to let me master the android ndk? i just wanna know how to operate in android ndk first! thanks in advance! ...

How do I add contact to a group on Android?

I read about ContactsContract.CommonDataKinds.GroupMembership, but I can't figure out what URI use to insert to. I have prepared this method: public static Uri addToGroup(ContentResolver resolver, long personId, long groupId) { ContentValues values = new ContentValues(); values.put(ContactsContract.CommonD...

Android List adapter issue..

How to remove item from a list view? how to reload the list after removal? ...

Type R.drawable.stat_notify_calendar cannot be resolved

I'm trying to make a notification in Android. But i get the error in the title by using: Notification notif = new Notification(R.drawable.stat_notify_calendar, tickerText, System.currentTimeMillis()); Do i need to define something before i try to draw it? ...

How to color and alignment spinner item on android?

I'm try to change text color and align item in spinner to center of it how can I do this here is my code String[] li={"1","2","3"}; final Spinner combo = (Spinner)findViewById(R.id.widget30); ArrayAdapter<String> a = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item, li); combo.setAdapter(a); ...

Android Reading from an Input stream efficiently

Hey, I am making an HTTP get request to a website for an android application I am making. I am using a DefaultHttpClient and using HttpGet to issue the request. I get the entity response and from this obtain an InputStream object for getting the html of the page. I then cycle through the reply doing as follows: BufferedReader r = new...

Android ListAdapter Repaint

Hi, i have the following problem. I fill a ListView with a custom ArrayAdapter with data from a BD. However, in background, i'm updating those datas from the info provided by an API, so the idea is when the update finish, the adapter shows the updated data instead its "old version". The problem is that when i do that, i notice a lag wh...

Why are some of my views not aligned correctly at the bottom of my relative layout?

I have problems getting some of my views aligned in a relative layout that I use inside a row of my listview. Here is a screenshot from the layout builder in Eclipse, this is what I think it should look like: The next image is from the emulator. Now the TestTestTest View is at the top and covers the name and distance Textviews. ...

Android, phone call audio stream via wlan

I am planning on developing my specific voip app for android. Here's the scenario: when a phone call occurs I want to hear the person who's calling on my local pc speakers and I want to speak to him via my own pc microphone / headset. So I need to send the audio stream of both me and the person I am talking to via the wlan network. Som...

LED-color HTC Legend

I'm trying to make the LED of the HTC Legend color blue along with my notification. notif.ledARGB = color.BLUE; notif.ledOnMS = 100; notif.ledOffMS = 100; notif.flags |= Notification.FLAG_SHOW_LIGHTS; The led just keeps flashing green (and not in the requested pattern). Is there something wrong with the code or doesn'...

How do you set tab view to scroll?

I have managed to set up a tabbed view for my app (woo!) and have the following xml for the UI <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="wrap_content"> <LinearLayout android:orientation="vertical" android:layout_...

Programmatically determining running APK (or DEX)'s filename?

Hi I would like to embed user-specific data on-the-fly when distributing an APK from my website (NOT from the Market). My current idea is simply to embed a unique ID in the APK filename. This is simple enough and changing the filename doesn't break the code signing. My current issue is trying to retrieve the filename (APK or DEX) so t...

AsyncTask, RejectedExecutionException and Task Limit

I am fetching lots of thumbnails from a remote server and displaying them in a grid view, using AsyncTask. The problem is, my grid view displays 20 thumbnails at a time, so that creates 20 AsyncTasks and starts 20 executes, one per thumbnail. I get RejectedExecution exception in my code. I recall reading somewhere that there is a limit...