android

Android: keep task's activity stack after restart from HOME

My application has two activities, that I start in this order: HOME > A > B Now I press HOME and launch "A" again. I would like to see activity "B" on a top of "A", but instead I get "A" - so the activity stack is cleared. Manifest: <activity android:name=".activity.A" android:label="A" android:alwaysRetainTaskState="true"> <int...

How to get EMail address on Android 2.0.1

Hello, I am trying to get the emails from a contact on Android (2.0.1). I can´t get the email. The code I am using is: String columns = new String[]{ContactsContract.Data._ID, ContactsContract.Data.DATA1, ContactsContract.Data.DATA2, ...

Coding Zones for Android Maps

How would you go about designing a system based on arbritary zones? Think of the American states - basically the whole map is carved up into irregular zones. Then again another one might show a salesmans territory, TV stations coverage area etc. I need to be able to retrieve the current GPS position and determine which zone I'm in. I can...

Why doesn't Eclipse always install my APK?

I'm using the Android plugin for Eclipse on OSX, latest versions of everything. When I run or debug my app, Eclipse is very inconsistent about uploading/installing the new APK. Nothing I seem to do has any effect on this. Clean builds, debug, whatever, there seems to be about 50/50 chance of installing the APK. Or not. If not, then I hav...

Restore android app stack from background

Lets say I launch my app from the home screen, navigate through some activities, then I press the home key and do something else in the Gmail app. After i'm done checking my mail,I press the home key again to leave the Gmail app and click my app's icon at the home screen again to return to it. When I return to my app, I want it to ret...

Android -- Help with XML of a "complex" row in a ListView

Hi, I have a relatively complex layout that I'd like to be the "row" of a ListView in Android and I'm having trouble getting the right-most element to show up on each row. Here's what the row should look like: There's an icon (50dip x 50dip) on the left and an icon (9 x 13) on the right. The icons should be left and right justified, r...

Web Applications v/s SmartPhone Applications (Iphone, Windows Mobile, Android/Nexus Application)

Q: How does Web Applications differ from SmartPhone Applications (Iphone, Windows Mobile, Android/Nexus Application) and in what specific aspects do they differ and in what degree ? Also for example, Q: Why we need mobile version of Web Application like gmail.com or bankofamerica.com specifically for smartphone devices where we can a...

Things to consider when calculating efforts required to port an application to another Handset

I have a G1 and an HTC Hero handset. All the applications that I've written were tested only on these devices; come new SDK and Android handsets with (support for) different screen resolutions, densities and capabilities I have been asked to estimate the efforts required to port some of the application to new Android handsets such as Dro...

New to android dev

I am new to android dev, own an HTC Eris Droid (OS = 1.5 or 1.6 I believe). I am primarily a Microsoft .NET developer and am trying to figure out where to start. What dev IDEs are suggested. I've seen the droid dev site and they suggest Eclipse. But which one? Will installing Eclipse and the JRE interfere with .NET development? Wha...

Passing arguments to a BroadcastReceiver through an Intent in Android

Hi I have an application, which sets an alarm using AlarmManager, which starts another Activity when it goes off. The AlarmManager takes a PendingIntent and spawns a BroadcastReceiver class when the specified time comes. I'm wondering whether there is any way that I can pass arguments to this BroadcastReceiver through the Intent obje...

Android tabwidget

I am using tabwidget when i apply white theme on tab widget selected tab text remain black but unselected tab text turn into white and invisible, how can i change the color of tab widget indicator text. ...

logging to a database when user clicks on a widget

I have a widget that displays an analog clock. What I would like is for the the widget to write to a database the time when a user clicks on the widget. I've already got the databaseHelper class and have an Activity that displays a screen showing the current date and time and writes the time to a database. I followed the tutorial here: ...

How to build custom grid

I have a problem and i will be grateful if anyoune helps me. Ok. I've started android programming 2 month ago. Now i am developing a simple game, nava battle. For this programm i need to build a grid, where i can place ships and coordinates. I can't seem to find out how I should be doing this? I think i should build a custom view, which...

How to schedule a background task

There seems to be a couple of ways to go about having a background task being executed. My usecase is to have my app fetch a datafeed every x minutes, regardless of my gui is running, and regardless of whether the phone is sleeping or not. I use an alarmmanager to schedule an intent matching a broadcastreceiver. in the onRecieve method ...

android httprequest compress response.

I am using httprequest to retrieve data from webservice, i know using tomcat we can compress response data using gunzip algo. but how can uncompress data to display, is un-compress is time consuming?? is there any other way to compress response and uncompress on android ??? ...

Customized Installation in Android

Hi! Is it possible to control the package installation process in Android? The problem is that I'm asked to install and uninstall packages without using the default android installer. I need to control the entire process within my application. I already have my application in the /system/app/ folder, so it might have the INSTALL_P...

android listview last visible line

In my application, i've a list view, if the last visible line is truncated and I scroll down to this line, I wish that the line becomes fully visible. I have to scroll down once more for it to become fully visible. ...

Storing the IMEI from an Android phone on an American Server.

Is it legally OK to store an SHA1 Hash of a user IMEI on a server? I have asked the user for permission before sending the IMEI. ...

Target option is disabled in Eclipse window->Preference->android

Why my target option in eclipse is disabled? I cant select the target platform. On the other hand the platform folder and adds-on are empty. Plz any ideas? ...

Android: application global onPause() and onResume()?

Is there something like an application global onPause() and onResume()? My main activity listens for GPS fixes, which I want to continue working when switching to another screen/activity. Therefor I cannot unregister my LocationListener in the activity's onPause(). However I still want to unregister my GPS listener when switching to ano...