android

Picking an image for Wallpaper.

Hello all, I'm writing a live wallpaper and need some help. My wallpaper will create an effect over top of another image or existing wallpaper (not another live wallpaper) that the user chooses in the "Settings...". My problem is this: I can't find a way to list the static wallpapers or images on the phone. I've seen some examples...

Good examples of Android projects covered by tests?

Could you point some good examples of Android projects that have unit testing in action? It would be great to learn by example from those. ...

How to disable Mobile Data on Android

Hey all. Quick back story before someone tells me to buy an app. =) I just got an EVO and it chews through the battery fairly quick. I downloaded JuiceDefender to manage my mobile data connection. That seems have worked out fairly well. However, the settings are just very restricted (even on the paid versions). As of right now I am t...

What is the point of the Application URL of Facebook Application registeration?

Hello everyone, I am developing an Android application for which I would like to add Facebook functionality using Facebook's Android SDK. I have registered the application and acquired the ID and Secret, but what is the point of the URL? Am I supposed to install something on my website on that specific URL so that I Facebook can do the O...

Are there any free rar decompression implementations available for the android?

I think the answer is going to be no, since the only question on the matter on SO is about memory requirement. However, before I go porting unrar to the android, I'd like to know if someone has done it already. ...

Is there a utility in the Android SDK or in Java to replace parts of a string using placeholders?

It would work something like this someUtility.replace ("Hello, my name is {1}. What is your {2}?", "Mark", "name"); Thanks in advance! ...

How to customize a TimePickerDialog?

I'm looking to create something EXACTLY like TimePickerDialog (look and feel) in Android, but it would be for MINUTES/SECONDS, not HOURS/MINUTES. Therefore AM/PM would not be relevant and would therefore allow MINUTE to be greater than 24 (making the max 59). Is it possible to change the TimePickerDialog instance in any way to reflect t...

Android SDK avd emulator kernel does not include netfilter/iptables

Where can I find the kernel including netfilter/iptables? Can I assume most market phones has netfilter included within their kernels? ...

onActivityResult fc when using SurfaceView on Android

My app fc when activity that's using SurfaceView as content view calls startActivityForResult(...) and activity that has been started calls finish() This does not happen if I change content view to something else than SurfaceView. This would be the requested logcat: 09-05 00:17:18.926: ERROR/AndroidRuntime(339): Uncaught handler: thre...

How can I develop for Android in Emacs?

I have gone through the Android guide for other IDEs, and I've got the basic build and install working fine using ant and a simple Emacs compile command. I'm aware of some of the existing tools for developing Java and XML in Emacs. I've also seen the EmacsWiki page recommending two Emacs packages, EmDroid and android-mode I'd like to ...

createNormalSurfaceLockedFailed Android

When I exit and reopen my application, it immediately kills itself off, stating in the logcat: I cannot for the life of me figure out why it would be running out of resources, when there is pretty much nothing that it does when resuming the application, other than set a few variables. Any help? ...

Android Timers Problem

i found this code for Android timers, public class myActivity extends Activity { private Timer myTimer; /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); myTimer = new Timer(); myTimer.schedule(new TimerTask() { ...

Android CheckBoxPreference defaultValue not working

Hi, It seems there's a bug in Android's built in preferences that makes defaultValue in CheckBoxPreference not work (see here). I need this functionality, and was wondering if there is a good workaround for this issue. Thank you, ...

Why does sqlite3 command using the android adb shell return "permission denied"?

Specifically, I was trying to use the sqlite3 command with the adb shell to run some queries on the database of the Android application I'm building. I kept getting "sqlite3: permission denied". I'm developing on a Nexus One that I purchased from Google. Does my phone need to be rooted or something? Thanks in advance. $ sqlite3 /da...

./droidgap:4:in `require': no such file to load

I'm trying to get PhoneGap working. I've hit a hurdle getting started. I've downloaded version 0.9.1. I've been following the instructions at http://phonegap.pbworks.com/Getting-started-with-Android-PhoneGap-in-Eclipse Using MacOS 10.5.8. Android SDK is already installed and working with Eclipse. My .bash_profile file looks like th...

get value from shared_prefs XML on boot in android

hi, let say i have a myPrefs.xml in shared_prefs folder and i would like to retrieve the value within myPrefs.xml on boot. How could i do it? Thanks. ...

onDraw calling frequently.

hello guys, i have a method which displays a map. i call this method in onDraw method. but on Action move i need to redraw the map and need to call that method again but i am not getting canvas reference to redraw the map tiles. i used invalidate method but it start refreshing the onDraw frequently which made my map movement too to slow...

Problem registering for C2DM in Android

Hi there, I'm trying to test the C2DM framework. I got the confirmation email a couple of days ago and then tryied to create a client that could register. For that purpose, I created a simple client following the steps described in this tutorial: http://code.google.com/intl/es-419/android/c2dm/index.html. The Android manifest file cont...

Unable start camera Preview on button click

Hi, I'm a newbie programmer for Android I was trying to start camera preview in Android on click of button. I'm trying directly to access camera hardware rather than using default camera application. Here is the code I've written import android.app.Activity; import android.hardware.Camera; import android.os.Bundle; import android.util.L...

Why do I get a "sqlite3: not found" error on a rooted Nexus One when I try to open a database using the adb shell?

# sqlite3 /data/data/com.moodme.android/databases/moodme sqlite3 /data/data/com.moodme.android/databases/moodme sqlite3: not found ...