android

Transparent Dialog Alignment

I'm trying to get a custom dialog with a transparent background doing this way: this.getWindow().setBackgroundDrawableResource(R.drawable.transparent); (where "R.drawable.transparent" is a reference to the color "#00000000") The weird issue on this is that I can't align my dialog window. It's always aligned to the left, even if I im...

Android alarm class

Hi, I have a class which sets an alarm but I need to set around 10 more of these alarms. Instead of duplicating classes, is there a way I can just make a new instance of the class and set the alarm time? Here's my code. import java.util.Calendar; import java.lang.String; import android.app.Activity; import android.app.AlarmManager;...

How can I debug javascript on Android?

I'm working on a project that involves Raphaeljs. Turns out, it doesn't work on Android. It does on the iPhone. How the heck to I go about debugging something on the Android browser? It's WebKit, so if I know the version, will debugging it on that full version of WebKit produce the same results? ...

Using the camera activity in Android.

If you want to use the built-in camera activity which uses the native Android camera, simply do the following. Intent camera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); this.startActivityForResult(camera, PICTURE_RESULT); You want to get the images back from the nifty camera you displayed, and here's how: If you want to...

How to determine if one of my activities is in the foreground

I have implemented a BroadcastReceiver which is triggered by the AlarmManager. The AlarmManager is initialized on BOOT_COMPLETED. So i have to declare the receiver in the manifest. My problem is that i want the BroadcastReceiver only to do something when none of my own activities are in the foreground (aka the user is not interacting wi...

Android: Distinct and GroupBy in ContentResolver

What would be a sensible way to add DISTINCT and/or GROUPBY to ContentResolver- based queries. Right now I have to create custom URI for each special case. Is there a better way? (I still program for 1.5 as lowest common denominator) ...

I am having trouble with every Android graphics/SurfaceView tutorial.

Hello, I'm trying to learn how to make video games on Android, and therefore I'm needing to get some decent tutorials going on how to make graphics on Anroid using the SurfaceView object. However every single graphics tutorial I've tried (mainly SurfaceView stuff) has failed. Please note that I don't want to use XML, as it is out of my...

How can you dynamically update the color of a SeekBar?

I would like to have the color of the progress bar (specifically the secondary progress that is updated with setSecondaryProgress) to change dynamically at runtime when it crosses a certain point. I am already able to substitute my own drawable into the bar during my Activity's onCreate function (changing color from yellow to green) by ...

Creating a large background and moving it with your finger

I am designing a Game and have a large background. The background it a lot bigger than the phone display so the user will only have a small "View" of the background. They will be able to move around by scrolling with their finger. How do i go about this? ...

how to give background color for small images while clicking in XML file of android?

Hi all ,in my application i used transparent images.but while clicking i want to display some background color.how to give that background color in xml file ...

How to use and package a JAR file with my Android app?

I have an API in the form of a JAR that I would like to use in my Android app. Not sure if it should be part of the project in Eclipse or kept separate and added to the project properties. This JAR also needs to be packaged with the application, so how is that done for Android apps? ...

How to get RelativeLayout working with merge and include?

I have been trying for a few days now to make my layouts more efficient by converting from using several levels of nested LinearLayouts to one RelativeLayout and have come across a few problems that I haven not been able to find a workaround for... I have searched the Android beginners group and this site and have not been able to find ...

Need an example showing how to do async HTTP requests.

Im using a web service, so I want to use an async thread for the HTTP authentication request and another thread later to make additional service requests while my main thread runs. Would like to see a good example of how to do this and how to show busy messages somehow in main app. How does the main app know when the thread finished? An...

How to stop deleting SMS from messaging app of android OS?

Does anyone know the solution to this problem in android? Can we get any event when a user delete SMS from Android messaging application. If yes, then how will we intercept Android messaging application. Please share your suggestions on these issues. ...

Checking speed of Android apps without needing physical devices?

I'm writing a game for Android. I'd like to target as many devices as possible. I'm aware that Droid owners buy about 50% of the apps and the rest are a mixture of G1 and HTC devices. So far, I've been testing my app in the emulator set to model the Droid phone (where I get about 40 fps) as well as on an actual Droid phone (where I get ...

How to invoke system dialog for "Connect to" secured network?

My application needs to establish a new Wi-Fi connection to a secured network. The catch is that the application does not know the password/key/passphrase or whatever it is called for WEP/WPA. And it should not know! In such case, I would like my application to invoke the system "Connect to" dialog. Only the system WifiManager should r...

Should I use XML or JSON as a data format in Android Applications?

I'm starting to develop an application for Google Android and heavily relying on a web API that can deliver data in a restful way via json or xml. I now have to decide which library to choose. I saw that google includes org.json classes in the API but haven't tested them yet. How are your experiences? What library/API should I use an...

Is it possible to set Android apps to connect to dev servers?

When building desktop or web apps, its easy to add fake hosts file entries so apps will connect to dev servers instead of production ones - is something similar possible for Android apps? ...

HelloAndroid emulator problem

I''m trying android SDK for the first time. I'm starting with the HelloAndroid tutorial. followed exactly each step but the emulator launches without my app. eclipse console says: [2010-02-23 11:47:55 - HelloAndroid]------------------------------ [2010-02-23 11:47:55 - HelloAndroid]Android Launch! [2010-02-23 11:47:55 - HelloAndroid]adb...

back and forward button for webview in android. how???

hi all, i am working on a webview. if i click anything in my webview . it redirect to another link by using webviewclient class. now i put a footer contains back and forward button. to do the option which in ordinary browser. i can work about to back and forward of webview.it works fine. now i want to set a buttons in the footer are ...