android

Google Android - how to figure out if 3g and 2g is turned on.

I'm developing a simple application for the Google Android to turn on and off the wifi or 3g or 2g. I see http://developer.android.com/reference/android/net/wifi/WifiManager.html#isWifiEnabled() that you can see if the wifi is enabled or disabled and also us http://developer.android.com/reference/android/net/wifi/WifiManager.html#setWif...

Android: Enable/Disable Auto Sync and Background Data

I want to develop an application that disable the Background Data (new feature in Android 1.5) and Auto Sync and then enable GPRS/EDGE connection and vice versa. I figured out how to enable/disable GPRS/EDGE by changing the APN settings. (weird solution. However; Android developers couldn't think a user may want to disable GPRS/EDGE) B...

Passing a Bundle on startActivity()?

What's the correct way to pass a bundle to the activity that is being launched from the current one? Shared properties? TIA. ...

How to animate text over another View in Android?

I'm trying to animate some text 'zooming out' on top of another view. My code looks something like: class BoardView extends View { private TextView animText; ... private void animText(String text, int color, int xBlocks, int yBlocks) { animText.setText(text); animText.setTextColor(color); animText.setVisibility(View.VISI...

Android MANIFEST.MF equivalent

On normal JVMs you can use META-INF/MANIFEST.MF to declare application properties, in J2ME you can use the .jad-Files but what can you do on Android? I need a way to declare properties which I can access using System.getProperties() on Android. It would be best if I could use the same file format as MANIFEST.MF-like property files use. ...

Bus error when running Android 1.5 emulator on Mac OS X 10.5.6

Here is the crash report. I have removed all Input Managers that were added, but it's still happening. Any ideas? Process: emulator [460] Path: /usr/local/dev/android/android-sdk-mac_x86-1.5_pre/tools/emulator Identifier: emulator Version: ??? (???) Code Type: X86 (Native) Parent Process: bash [275...

Android : Customizing tabs on state : How do I make a selector a drawable

I know how to put the icon on each tab, that is no problem. I also ran across this : Stack Overflow thread on pretty much same thing I followed one of the links from that question, and found this Pretty much, it said use a selector defined in the xml, sure, did that. But there is no id associated w/ it so I am not sure how to get the s...

Android: determining the current context to display an alert

I am calling the ZXing scanner from Screen-A using intents. Once the scan is done control of course returns to the code behind Screen-A and I do some other work before calling Screen-B. Problem is the screen is black during this work period and I cannot determine the proper context to use to display a "working..." Toast/msgbox. Any he...

Add an array of buttons to a GridView in an Android application

I have an application that will have 5-15 buttons depending on what is available from a backend. How do I define the proper GridView layout files to include an array of buttons that will each have different text and other attributes? Each button will essentially add an item to a cart, so the onClick code will be the same except for the...

What is the most appropriate way to store user settings in Android application

Hi, I am creating an application which connects to the server using username/password and I would like to enable the option "Save password" so the user wouldn't have to type the password each time the application starts. I was trying to do it with Shared Preferences but am not sure if this is the best solution. I would appreciate any ...

Why is is a TabHost stealing focus from a TextView in Android ?

I have an application using the following layout : When the app start, the focus is on the first TextView, but if you try to type any letter in it, the focus goes directly to the tabs. It seems that I am not the only one fighting with this issue, and maybe this is related to the following : http://groups.google.com/group/android-deve...

Listener to socket at client(Android)

Hi folks, I want to have a listener for a socket at the client side. I am using Android which is Java. I am using TCP/IP but I don't want to loop at the client side. Is there any method for that or do I have to have my own mechanism for listening? Any help would be appreciated. Thanks in advance, ...

How to start developing applications for Android?

I'm interested about learning how to develop applications for Android. I downloaded the Android SDK but I don't see where to begin. Any suggestion? Any literature? Thanks in advance for your answers. ...

Why are touch events destroying my Android framerate?

I'm developing a game for Android. It's got a lot going on but is running reasonably smoothly. That is, of course, until the user touches the screen. While they're touching it, onTouchEvent is called (with action = ACTION_MOVE, x = 0 and y = 0) roughly once every ten milliseconds at what appears to be a fairly high priority, as it absol...

How to cache views with Android and avoid calling onCreate everytime.

Hello everyone, I've got a question that is annoying me. With Android, I've got an application that seems calling "onCreate" every time on a new instance of an activity, because this activity is the son of an another and it finishes itself while it ends its role for one piece of data. The calling of "onCreate" everytime seems to be re-...

Android Service Testing

How to test my IBinder object that Service return on onBind ? ...

Language support on android

Hi folks, i want to type in different language in android other than english like hebrew... by providing ttf files . Are there any in build API's so i can use that .... Any help would be appreciated , Thnx in advance.... ...

How can I get the Android SDK, version 1.5, to run on my G1 phone?

Well, put it this way. I have already tested an Android application in emulator. Now I want to try that in a real G1 phone. But I am not able to run 1.5 SDK on my G1. Could anyone help me with this, please. Thnx in advance... ...

ImageView trouble

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:src="@drawable/wallpaper"...

Android schema validation

hi, I have created an XML and i am having an XSD file and i have to validate the xml with this schema ,can i get any example for doing that . And where i have to place the xsd file in my project so that i can validate with that schema. ...