android

How do I 'drop' an sqlite DB on an unrooted Android phone?

Before I found out about that adb shell doesn't have the permission to do much with /data/data I was using my unrooted Verizon Droid for development of a content provider. How do I get rid of the database I created there? Is my best option writing a small app that drops the database? ...

Android writing to a CSV file via OpenCsv

I try to write to a Csv file via: mFileWriter = new FileWriter( "/sdcard/program/file"); mCsvWriter = new CSVWriter(mFileWriter); At the moment it throws an exception that the file doesn't exist. It's true that the file doesn't exist. What's the easiest way to create the file? ...

Too many dispatchDraw, why?

I am having an activity with two ViewGroup as it's children, and each ViewGroup has one or more views in it. I found that the dispatchDraw() is being called four times each time I make change, and 10 times when I use ViewFlipper to flip to next or previous. It really kills my performance, but I can't find out where these draws come from ...

How do I access layout_height from within my custom view?

I have a custom view and I simply wish to access the xml layout value of layout_height. I am presently getting that information and storing it during onMeasure, but that only happens when the view is first painted. My view is an XY plot and it needs to know its height as early as possible so it can start performing calculations. The ...

Checking if a new SMS has been read

I am working on a simple app for the HTC EVO that blinks the alternate notification LED when a new text message is received. I have this part working great via a Broadcast Receiver but I need some way to turn the LED off when the user has read the message(s) using their default SMS app. I'm not sure if it is best to do this in the receiv...

Anything below froyo can't read method in 3rd party library

I'm using the jexcel api in my android application. It works great on devices running Android 2.2, but any other device just gives a blank String when I try to get the contents of a cell. I've narrowed the thing thats not working to the Cell.getContents() method in the jexcel api. All android version below 2.2 are able to get the workbo...

Handler inside a Thread run

I'm new to android, bear it with me. I've a TimerTask for which I define run() inside the Service. Inside run(), I'm calling locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, LOCATION_UPDATES_MIN_TIME_MS, LOCATION_UPDATES_MIN_DISTANCE_M, gpsListener); and it complains that can't create Handler, since I believe...

sending email from android application?

Is it possible to set up a form in an application and have the person filling out the form send the information to you? If so could I get some examples? ...

Emulator does not load

I am using the hello android tutorial and creating an avd through eclipse. When starting the emulator no image is used. It simply displays a black back screen with the word ANDROID in the center and a blinking cursor at the end of the word ANDROID. I have followed the steps to the T for installing the SDK, Eclipse, and the ADT. Even ...

Why does Android listview sometimes disappear after calling requery on underlying cursor?

I have a fairly simple application that uses a ListActivity to display a ListView. Each ListView item has a CheckBox so that the user can specify favorite items. I am using a class that extends SimpleCursorAdapter so that I can capture both the CheckBox changed event (to save the change to the database) and the list item clicked event ...

Cannot test build Android application on my HTC Evo

I cannot test build Android application on my HTC Evo at all. I searched online for answers, but nothing helped, including updating all the software. The Eclipse launched Emulator doesn't recognize it as an external device either. Any ideas? I have a presentation at my job tomorrow, and it has to be on the phone. ...

Possible to 'layer' Android applications?

I know this in general is beyond the scope of SO, but I am looking for some basic yes/no info to see if it is even feasible to proceed... I am thinking about building and Android 'note-taking/annotation' app that runs 'over' other installed Android apps, such as the web browser for example. Essentially, while the user is browsing, my a...

Android : HttpClient POST : NullPointerException

Hello, I am new to Android development since my EVO purchase a few months ago. Anyway, I am developing my first Android app using Eclipse and Android SDK emulator. I am trying to do a simple HTTP POST. My real code has my login information hard coded in so I replaced it with test information and I changed the url as well to simply POS...

Android AdWhirl & AdSense 3.1

AdSense (Google AdSense SDK 3.1) alone works fine in my app. When I use AdWhirl I see in my Log always: :WARN/AdWhirl SDK(562): AdSense company name and app name are required parameters How do I send this params right so also AdWhirl transfer it to AdSense?? (I didn't delete the params I used for ONLY ADSENSE.. so they are still ...

Copying a file off an android device?

How can I copy a file from some Android app's assets folder, to somewhere off the device? Alternatively, how can I move or copy an app so that it is installed on the sd card, not the main rom? Peter ...

PreferenceActivity gives a NullPointerException when option selected from ListPreference

Hi all, I'm new to using the PreferenceActivity. Task: Allow user to choose the program layout from the Preferences Problem: Selecting an option in the PreferenceList causes a NullPointerException Exception arises: At android.preference.ListPreference.onDialogClosed() (Shortened) Code: private static final String PREF_LAYOUT_KEY =...

Subscript and Superscript a String in Java

How can you print a string with a subscript or superscript? Can you do this without an external library? I want this to display in a TextView in Android. ...

custom dictionary for edittext in android

Is it possible to create a custom dictionary for an edittext? In other words, can I create a custom list and have the edittext only suggest names from that list? I don't need it popping up useless word suggestions when the user is inputting specific names of people. ...

Remove the bottom line border in tab bar? (And change selected color)

Is it possible to remove the bottom line showed in the tab bar? It is grey when not selected. And is it possible to change the yellowish color to something else? layout xml: http://pastebin.com/M2KqtH1r ...

Android Listen for/Detect entry into the log

Is it possible to listen for entries to the log? Ie is there a broadcast intent for when a log entry is appended? ...