android

VM Limit in Adroid 2.0

Is there a way to expand the VM limit in Android 2.0 on an actual device? Using java.lang.Runtime.maxMem() on a Droid reveals a limit of 24MB, and I've written some code that incrementally allocates memory until failure to verify that figure. You can set the VM size in the emulator, but I haven't yet found a way to do that for a connec...

Adsense not displaying on HTC Hero

We've been developing an Android application which includes Google Adsense. However there seems to be a problem with the ads not showing on HTC Hero phones. It does show on HTC Magic. Have anyone else had the same problem? Are there any Hero-specific settings which is needed? ...

Alarms on the Google Android

I'm noticing a strange thing with Alarms on Android - they don't always wake up the device at the correct intervals. For example, if I set an alarm to start a service every 5 minutes (using RTC_WAKEUP, or similar), everything works fine until the device goes to sleep - after that, the alarm may not fire for minutes, or close to an hour. ...

Motorola Droid by Verizon: Can I deploy Android Apps directly to the phone?

I'm thinking of doing some work in the Android space and was looking at the Verizon Motorola Droid. My question is simple: Can/How do I directly deploy applications I am developing and testing to my personal phone or I limited by some other third party as to how I can access my own phone? ...

Best Rails / Android / Appcelearator development OS if have no money to buy a Mac

What operating system do you recommend. Currently I have Vista installed but it isn't developer friendly. I'm doing rails apps and learning Android development an Appcelerator. Oh, and haven't the budget for a Mac :( ...

Exponential function in android

How yto convert a value to exponential i mean 1.522222 to 152.2222e-2 and .1522222e+1 and 2 2. string s=123456789123 my s.length is greater than 9 than i have to get a value 1.234567891e+11 and the same in case 0.0123466789, now i need out put like 1.23456789e-2 ...

Bash scripting on Android

Has anybody tried bash scripting on android? I tried to write a simple script on Android's bash shell through adb. I tried the following script which works for me: #sh1 x="hello" echo "$x" But when I do: #sh1 x="hello" if [ -n "$X" ]; then echo "hi" fi The error says [ -n not found! Why do I get this error and is there a work ...

clicking function in android

hi how to apply clicking action on listview in android ...

Bind JSONArray to adapter

How would you go about to bind a JSONArray to an adapter, the adapter will be used to bind data to a spinner. Of course I could iterate over the strings in the JSONArray and add 'em to a String array, but that seems cumbersome. ...

How do I connect to a URL when clicking on an Android ListView?

Hi. How do I connect to a URL when clicking on a ListView? ...

Reusing java source in multiple projects

I'm currently developing for Android using Eclipse. I have a lexicon viewer application (with package name "com.mycompany.myviewer") that I want to reuse multiple times, just changing specific resources such as app name and icons. For example, I have a certain publisher "Publisher1", who publishes the lexicons "Lexicon1" and "Lexicon2". ...

Reasonable size of data to store in Bundle on onSaveInstanceState()?

Hi, My android app fetches a JSON structure from the net. It's somewhat large, maybe 2,000 characters in length. I need to store it away when my app gets killed so I can recover it quickly. I've tried saving it to an sqlite database, but that takes about 400ms, kind of long. I wonder if it's bad practice to just dump it into the save bu...

Adding screen brightness controls to android application

I am looking to add controls to adjust screen brightness locally in my app menu but can't seem to figure out how to do it. I have seen examples to max-out or dim brightness but I am looking to add controls so that the user can control and set the brightness level. Does anyone have any examples, tutorials, source code, or just a place to ...

Custom Android Keyboard Input Filtering

I have an EditText that is to collect input for a basic calculator. I want to bring up the numeric keyboard, and thus I set android:inputType to numberDecimal|numberSigned. Problem is, the EditText filters out all characters that aren't numeric, such as "(", ")", "/", "*". I have tried overriding this behaviour by setting a custom Input...

Html.ImageGetter

Can any one help me out how to use Html.ImageGetter to dispaly images using html image src tag ? and example or good tutorial ...

Drawable => grayscale

What would be the right way to turn a color Drawable into a grayscale one (to indicate disabled state)? EDIT: B/W => grayscale ...

Email Intent not showing the chooser.

I'm using the following to initiate the sending of an email: Intent i = new Intent(Intent.ACTION_SEND); i.setType("message/rfc882"); i.putExtra(Intent.EXTRA_EMAIL, new String[]{s}); startActivity(Intent.createChooser(i, "Send mail...")); The problem that I'm having is that (on my phone) it pulls up Gmail's Compose window instead of a...

clicking function in android

how to connect to email while clicking on button in android ...

What is the preferred method for uploading to a server from Android?

I've been trying to find a way to upload a video from an Android device to an API, but I haven't found a good way to do it. It seems most of the information I've found online is fairly out of date (a lot of it being from last year). Most of them are using a method like this: http://getablogger.blogspot.com/2008/01/android-how-to-post-f...

Android: raise AlertDialog from background thread

In my activity there's some stuff going on in a background thread, which gets started in Activity_1. The processing of the background thread takes a while and I want to notify the user when it's completed via an AlertDialog. However, the user might have changed to Activity_2 or Activity_3 in the meantime and I would like to pop up the Al...