Greetings yet again. I have an minor issue when taking a photo. I have a button that invokes the camera, successfully takes a photo, and returns to my entry form. My only problem is the database leak that occurs when pressing the button to call the camera. My code looks a little something like this.
public void takephoto(){
Int...
I know this is possible as the built in clock app and other apps are able to do it.
How do you turn off the button backlights from code? These would be those like the softkeys on the bottom of the Nexus One screen.
Update:
Found this, but it only works on Froyo:
WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.buttonB...
In the Activity title bar, how do I put a spinning wait in the upper right corner?
...
I'm relatively new to programming in general so be gentle =| I'm trying to start a new activity from a basic one that displays a couple of text inputs, a checkbox, and a button. When the button is pressed I want it to switch to the new activity. The code compiles but when I press the button in Android it simply crashes. Any help would be...
I have 2 Activities that need to communicate with each other: ActivityA and ActivityB
Say that ActivityA opens ActivityB. How do I unicast a message from ActivityB to ActivityA without closing ActivityB?
Here's what I tried:
setResult() - but the intent will
be delivered only when ActivityB
closes
sendBroadcast() - but this sends th...
Hi, I'm using the Android SAX parser to search for entries in a rather large (6MB) XML file. I'm basically using a derivative of the code shown in listing 8 here. The question I have is how do I stop parsing once my match has been found? The code shown continues parsing through the end of the file but I want to stop before then. Is this ...
I try to retrieve a picture from e.g
http://graph.facebook.com/btaylor/picture
using the following code:
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpGet request = new HttpGet(urlString);
HttpResponse response = httpClient.execute(request);
return response.getEntity().getContent();
but occasionally I get the exception...
When my ListView activity loads it creates the Adapter which fills the screen as it should do. Is there an event or way to find out when the Adapter has finished getting enough data to fill the screen.
I want to show a spinner the first time the Activity loads and have it go away once the screen has its first load of data from the Adapt...
I have an open-source application on the Android market. It seems to work fine for me (with over 1,000 active installs, I have to presume that it works for most people).
I recently got a bug report that indicated a problem for at least three users on Samsung phones (Intercept and Captivate). I have been unable to reproduce the problem...
I want to send AT commands in my Android application, but I could not find the right syntax. How can I do this?
...
I tried to set up my togglebutton properties layout using style.xml.
Here's my code:
<ToggleButton android:id="@+id/button_toggle_1" style="button_test_1"/>
<ToggleButton android:id="@+id/button_toggle_2"
android:textOff="test2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
...
Hi all,
I have a WebView inside the ScrollView.
The content of WebView dyanamically changes when it displays different html page.
I have the following issue:
For example I have A.html, and B.html. The content of B.html is larger than A.html, so the page is longer.
When WebView load B.html, the ScrollView stretches its size to enabl...
I've been having an issue with data integrity using an RFCOMM socket over Bluetooth in Android. I don't have any issues connecting, but the data I receive is garbled and not the same as the data that is sent. The data is sent by an RS232 device over a Bluetooth adapter, which the phone connects to. There isn't a problem with the adapter ...
Alright, I'm just trying to learn about using Contact information, but I'm a bit stuck. I would like to be able to display a picture for the contact. Using the following code that I have, how would I be able to put the photo for the contact in the ImageView in contact_entry?
ListView contacts_list = (ListView) findViewById(R.id.contac...
Hi !!
I am new to the android programming environment.
I am currently working on a project which deals with the user's phone battery level.I am showing the current battery level left on the phone.now i want to display the amount of duration of "idle time, talk time, video playback, audio playback and web surfing" that can be done based ...
Hi:
I am new to Android and this is my first question here so please go easy on me.
Is it possible to check some condition inside onCreate() of an Activity and display an AlertDialog?
I am creating an AlertDialog anonymously in Oncreate() and calling show on that instance but the AlertDialog is never displayed.
...
I am using a Mac with Eclipse Galileo, trying to load Android code from a public repository.
I tried 'Checkout from SVN' and the URL is:
http://secrets-for-android.googlecode.com/svn/trunk/secrets-for-android-read-only
This is from the website:
http://code.google.com/p/secrets-for-android/source/checkout
I get the error:
Error valida...
How to add contacts in Android 2.2. Please help as I am not able to make it. I am adding contacts but it is not visible
...
I am trying to set a 9-patch image as the background for one of my activities but it is stretching unescessarily making everything get all wierd. I used draw9patch to create it and added one pixel to the bottom left and one pixel to the top right. I then save it into my drawables directory as intro_bg.9.png. I want to stretch the very...
Hi all,
Is it possible for audio recording in emulator and store it not in sdk but some where else
...