android

Problem creating AVD on command prompt in windows XP

I am the beginner for android development. i followed the procedure as specified in developer.google.com . for installing i Tried to crete AVD(Android virtual device) through command path.I executed at command prompt. android create avd --target 2 --name my_avd But the Error is coming "Error: Target id is not valid. Use 'android.bat li...

Creating an empty Drawable in Android

Creating a Drawable that is completely empty seems like a common need, as a place holder, initial state, etc., but there doesn't seem to be a good way to do this... at least in XML. Several places refer to the system resource @android:drawable/empty but as far as I can tell (i.e., it's not in the reference docs, and aapt chokes saying th...

Closing down a service that has active Threads

When I load my application I also load and Android Service that helps me download files from the internet. The user may have 1 or more downloads at any given time, all in their own Thread which is managed by the service. If the user presses the home button I do not destroy the service but instead let it run, however, if the user pres...

Reading the connected computer's drives from an Android App?

I would like to have an application sync itself with some files on a host computer.. Anyone know if this is possible? Eg: When you connect an Android phone to a computer i would like an application on the android system to read some allowed folders on the connected computer. Making it so the user doesn't have to sync files itself. I ask...

test the localhost in android emulator

Hi. My web application runs in localhost server. In my emulator the URL is http://localhost:8080/myaction Is it possible to retrieve the informaion from the server? ...

Android Emulator: Receive SMS sent from emulator on a port

Hi! I intend to use the Android Emulator to send/receive SMS. I send SMS to the emulator using the sms send command. I'm aware of emulators being able to converse with each other over SMS but would it possible to receive that the SMS reply sent from an Android Emulator on a external TCP port? Any pointers would be very appreciated. ...

can we bind 3 controls into a single control in android?

I have 2 textviews and one imageview and i want to bind them into a single control so that i can implement horizontalScrollView on them... Is there a way to merge different controls so that we can use them??? Or is there a way to implement horizontalScrollView on multiple controls simulataneously?? Thanks in advance ...

How to have a read access to google.com/contacts from an android handset ?

Hi all, In my android application, I would like to retrieve the birthday field from google.com/contacts, as this field isn't synchronised in the android contacts application. How can I have a read access to google contacts ? I saw the Google contacts APIs, did I have to use it ? which one ? the Portable version ? Or is there a simple ...

Stop Internet access on the emulator android

Hi, Ok my question might appear a bit strange but here is my problem : I am testing a database storage after retrieving data from the internet, then i would like to be able to start the emulator with internet working, and then, while it is running, stop internet access to force it using the database as a source to display data. Is that ...

How do I display 2 views in 1 activity (android)?

Suppose I have a webview open: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); main_webv = (WebView) findViewById(R.id.mainwebview); main_webv.setWebViewClient(new HelloWebViewClient()); main_webv.getSettings().setJavaScriptEnabled(true); main...

How to do a WebView AND ListView in the same Activity onCreate()?

public class hello extends Activity, ListActivity { WebView main_webv; ListView main_listv; public static final int REFRESHLIST_ID = Menu.FIRST; private Handler mHandler = new Handler(); private static final String SPLASH = "http://"; private static final String LIST_NAMES = "http://"; private class HelloW...

Adding icon to top right of android home-screen

Im trying to make my application show an icon to the top right, next to the clock and battery-icon: http://img694.imageshack.us/img694/1372/androidemulator.jpg I am unable to find any documentation on this issue. If it is undocumented, i.e. "API can be changed at any time", then I dont think I will use it. But otherwise, it would be ve...

Save activity gui state

So I'm writing an app. I would like to be able to press the home key to leave the app, do something else for a moment, then come back to the app by picking it from the launcher. I want the app to have exactly the same state as it did when I left it. To this end, I have implimented onSaveInstanceState() to create a bundle, and I use this ...

load the mysql driver in android emulator

how to load the mysql server in android emulator i.e Class.forName("com.mysql.jdbc.Driver") i got the exception java.land.ClassNotFoundException in com.mysql.jdbc.Drive please reply me. ...

Tracking power use on Android

I have an application that keeps a long-standing network connection to a server. I periodically ping the server to know if its still alive. I imagine that it affects battery life, but other than trying to wall-clock time the time between charges, I don't have a good way of quantifying this. Is there a mechanism for being told when the...

ADB rejected shell command (ls -l /data)

I keep getting ADB rejected shell command (ls -l /data): and the command prompt when running adb shell tells me error: device not found although the emulator is open. What I am doing wrong? ...

How to attach back the Android emulator to ADB?

After I start the emulator by hitting Debug in Eclipse, after certain time it disconnects from the ADB, but the emulator stays open. It is responsive, I can navigate and start apps. How can I attach back the emulator to ADB, to be able to debug from Eclipse? (the current workaround is the terminate the emulator, close Eclipse and resta...

Help for basic Android view for a Next/Prev navigation like E-mail setup

I am after the XML view code, just like the E-mail setup. How can I put on that bottom grey bar that Next button, how about a Prev button on left side? ...

Android: click within WebView causes callback to Android application

I'm thinking of implementing a HTML welcome panel to our Android app, which presents news and offers on the start-up screen. My question is now, if I present an offer to a specific place (with an id string) can I trigger a callback from the WebView (maybe via Java Script) to the Android app and passing that id string to make it start a n...

how to redirect to particular URL while clicking on button in android?

hi,i want to redirect to particular URL while clicking on button ...