android

Get data from XML in Android?

I have tried to use xpath in Android 1.5, but it does not seem to work? Could someone please tell me the best practice on retrieving a value from XML in this case? If you have any worked through examples, that would be a real help! Also, my XML is as a string, so I will need to convert it to be an xml document resource? ...

Finalizing a Cursor that has not been deactivated or closed non-fatal error

Hello all, i'm getting a "Finalizing a Cursor that has not been deactivated or closed" error on this piece of code. The code is used to fill a listview. Since it's a non-fatal error , there is no crash and all seems to works fine..but i don't like the error. If i close the cursor at the end of this code..the listview stay's emp...

Center a group of four buttons in a RelativeLayout in the Android SDK

Hey, I currently have four buttons placed in a keypad-like arrangement in an AbsoluteLayout. <AbsoluteLayout android:id="@+id/WalkingTabView" android:orientation="vertical" android:gravity="center_vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"...

Use Of Android NDK

Hi!!!! i am new for NDK. i want to know what is the benefit of native code in android . By this can we improve our application performance. and main thing exactly when we will use this native code. please clear it. and from where i can get more information............ ...

How do you download a specific release of Android source code (e.g. Android 2.2)

I've never used git before, but I'd like to download the android source code as I'm getting a crash in the 2.2 emulator and I'd like to see exactly where in the android source code it's crashing (so I can file a better bug report). Edit A decent answer would include instructions on using git to download a specific repository. I'm on wi...

App crashes on back button / Activities & Intents

I have an android application which starts a new activity Intent startAuthorization = new Intent(AndroidActivity, AuthorizeUser.class); startActivityForResult(startAuthorization,4711); When that new activity is done (a ok button is clicked) I call setResult(RESULT_OK, returnResult); finish(); Which works fine. In case the us...

Prevent an Activity from being killed by the OS while starting a child activity

I have a main activity which calls a child one via Intent I = new Intent(this, Child.class); startActivityForResult(I, 0); But as soon as Child becomes visible the main activity gets its onStop and immediately after that onDestroy method triggered. And as soon as I call finish() within the Child activity or press the back button, the ...

How can I send an Android app that I'm developing to someone over e-mail?

It's my first Android app. I need to send what I have so far to someone for testing. It needs to be over e-mail. How should I do it? ...

Protect HTTP request from being called by others

Hi, I have an Android application from which I want to upload some data to a database on my web server. As the MySql java library has a size of about 5 mb, I don't want to include it with the application. So I'll make a HTTP request for a php script and send the data with the URL as parameters. How do I make sure that only I can call th...

Playing html5 audio in android browser

I have a javascript that plays audio in the browser, using the html5 <audio> tag. It works fine in the iPhone browser, but not in Android. (Testing using a htc desire with android 2.1.) Anyone know why? My code: function playHTML5(sound, soundcv){ // sound = url to m4a audio file // soundcv = div in w...

How can I read all contacts in Android 1.5 mobile ?

I want to be able read all contacts in Android mobile version 1.5. Please help me. list readble contant and example please thanks in advance ...

Change default onListItemClick Behavior of ListView

Is there any way i can make my listactivity (rather listview) highlight the List Item when it is clicked (pressed) upon? (...and remain highlighted) The default behavior, simply highlights the item for a moment, and it gradually fades to black... Currently, the highlighting only happens when we use the DPad... It'd be ideal if atleast ...

IllegalArgumentException: Service not registered:

I have multiple activities in my app, evry activity calls bindservice and unbind service method to fetch data. in first activity unbindservice method works fine but in next activity which is also reusing same service where bind service method works fine but unbindservice method gives exception: IllegalArgumentException: Service not regis...

Can someone please explain Cursor in android ?

Can some one explain how the cursor exactly works ? Or the flow of the following part of the code ? I know that this is sub activity and all but I did not understand how Cursor works exactly. final Uri data = Uri.parse("content://contacts/people/"); final Cursor c = managedQuery(data, null, null, null, null); String[] from = new String[...

How to invoke the Android calculator from an app.

I want to invoke the android calculator from within my app. I don't want to pass anything to it, just provide a quick launch button to it. Can anyone show me how or point me to an example of how to do this? ...

Android Signal analysis + some filters.

Hello, as the world cup is the main sport event and the Vuvuzelas are the most annoying sound in the world, I had an idea to remove them definitively by reading this new ( http://www.popsci.com/diy/article/2010-06/simple-software-can-filter-out-vuvuzela-whine) that told us that the sound has some frequencies at 233Hz + 466,932,1864Hz. ...

How to solve this ?

Hi all. I use the following code in java. It works well and it adds events into Google calendar. But in android it gives the Exception “Error connecting with login URI”.Can anyone help me to solve this?? CalendarService myService = new CalendarService("calendarTest"); String userName = "[email protected]"; String u...

Is it possible to display image with loadDataWithBaseURL() method in android?

I'm trying to display the content of a html file with the loadDataWithBaseURL() method in android. I just have a String that contains the Html file data in one String called source and I then pass this to the method. for e.g String source; //contain html tags with images View.loadDataWithBaseURl(null,source,"text/html","UTF-8","about...

how to solve this in android ?

Hi all.I am new to android. I can able to add the data to google calendar via my java application.But the same code is not working in the android.It gives the Exception message Error connecting with login URI how to solve this??? ...

How do you get the current DNS servers for Android?

Hi, I´m trying to get hold of the addresses to the currently used DNS-servers in my application, either I´m connected thru Wifi or mobile. The DhcpInfo object should provide this but how can I get hold of a valid DhcpInfo object? Best regards John ...