android

Validating Dialog Input

I am using an AlertDialog that is very simple, just a custom view with a text box, and the alertdialog positive submit button. I would like to validate that the text box has had text entered before the user dismisses the dialog. I see two possibilities, with questions about each: Disable the submit button until the text box is not empt...

Android: Defined array resource not found ?!

Hi, i have a strange (?) error in my android application. I have defined some arrays in values/arrays.xml the following way: <?xml version="1.0" encoding="utf-8"?> <resources> <array name="perimeter"> <item>10 miles</item> <item>20 miles</item> <item>30 miles</item> </array> <array name="regvalues">...

Correct use of Classloader (especially in Android)

I read some documentations about classloaders, but im still not sure where and why they are needed. The Android API says: Loads classes and resources from a repository. One or more class loaders are installed at runtime. These are consulted whenever the runtime system needs a specific class that is not yet available in-memo...

Is it possible to modify Android internals and reinstall the operating system on a phone?

I have an android phone and am thinking of a project in which I will need to modify the operating system and reinstall it to the phone. Is this possible to do so? Can i be sure my phone is not gonna give up on me? Thanks. ...

Making the user change the time in Android

Android doesn't appear to provide a way for a user application to change the system time. What I would like to do instead is to get the user to change the time. It is easy to open up the Date & Time settings: startActivity(new Intent(android.provider.Settings.ACTION_DATE_SETTINGS)); What I would like to know is: Is it possible to li...

Transparent View with Android

Hi everybody, I try to have a bitmap moving over my android application. I m be able to have my bitmap behind my text view, but not over them. public void onCreate(Bundle savedInstanceState) ... // ll is a FrameLayout ll.addView(text1); ll.addView(text2); ll.addView(new Panel(this),200,400); my Panel class is de...

How to limit the number of the same Activity on the stack for an Android application

Is this possible in an Android app? I want to make it so that no matter how many times a user starts activityA, when they hit the back button they will never get more than one occurence of activityA. What I am finding in my current code is that I have only two options: 1. I can call finish() in activityA which will prevent it from being...

Android VideoView - Detect point of time in video

Hi all, I am using a VideoView to display a video. I am using setOnPreparedListener and setOnCompletionListener to do stuff before and after the video starts and ends. I was wondering how I could go about detecting some point of time in the video. For eg, say I want to write log to a file when the video has played for 10s. How can I d...

Android: multiple icon in ListView

In my List View, I want to display multiple Icon. Icon1 for list row 1, Icon 2 for list row 2, Icon1 for list row 3. ...

Could not open Selected VM debug port (8700)

I am trying to debug the android source using Eclipse by following the instructions found at: http://source.android.com/using-eclipse I have downloaded the source, and gotten it to build. I follow the directions in the link above and everything is fine until I run the ddms command. At this point, if Eclipse is running I get the error...

don't display the notification after seeing that once

Hi I don't want to display the any notification service in status bar if i saw one notification service once .For example i am displaying persons who are exceeding the 20 km distance from my location .some persons are displayed.when i saw it once then automatically the icon in the status bar is don't displayed.For this one give me some s...

How do I keep from running out of memory on graphics for an Android app?

I've been working on an Android app in Eclipse, and so far, my program hasn't really grown past midget size. However I've already run into an issue with an Out of Memory error. You see, I've been using graphics comprised solely of bitmaps and PNGs in this program, and recently, when I tried to add a little bit more functionality to the...

Does pressing Back always cause Activity to finish()?

I've heard that pressing the back button will essentially cause the current Activity to finish(). Is this always the case? Seems like it would be with the way it pops the Activity off the stack. The one situation I'm not so sure about is when the root Activity in a Task has back pressed. I'm currently experiencing a very weird effect, d...

how to pick email address from android phonebook?

friends, i am using folloing code to get addressbook name phone android phone. btnContacts = (Button) findViewById(R.id.btn_contacts); txtContacts = (TextView) findViewById(R.id.txt_contacts); btnContacts.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { Intent intent ...

Change the settings using adb shell command

I have to change the Display timeout using the ADB shell commmand. Can anyone help me regarding this. Thanking you Pradeep B S ...

avoid package dependency

Hi, i have couple of appz(diffrent apk's), and i run activities from one app to another. my target is to avoid package depndency between them, in case in the future i want to upgrade or compile one package without the absence of another. the problem is that: without setting the dependecy between eachother(eclipse: buildpath->projects),...

Converting a view to Bitmap without displaying it in Android?

Hi, I will try to explain what exactly I need to do. I have 3 separate screens say A,B,C. There is another screen called say HomeScreen where all the 3 screens bitmap should be displayed in Gallery view and the user can select in which view does he wants to go. I have been able to get the Bitmaps of all the 3 screens and display it i...

How to configure the 5554:WVGA800H model in android

HI Can any one help me out in Configuring the 5554:WVGA800H model in android,as per this link http://developer.android.com/guide/developing/tools/emulator.html#emulatornetworking they have given the screen for the TABLET ,can any one guide me in this? Thanks & Regards P.Sivasankar ...

Will <include> override the layout_width/layout_height value?

I have a layout xml file named my_layout.xml, in which the root view's layout_width and layout_height has been specified as 200px. <com.jlee.demo.MyLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="200px" android:layout_height="200px"> If I used...

can anyone give code for voice recorder as an application on android phone?

i want to develop an application on android phone regarding voice recorder.i have to record a sound for about 30 seconds and then stop and save the recorded sound in gallery.can anyone post the code if you have please? ...