android

Detect if an outgoing call has been answered

Once ACTION_NEW_OUTGOING_CALL has been broadcasted, I need to capture the following event of the other party answer. Could you advice on how to achieve that please? I know it is possible as the android dialer app changes the green android icon to the person's photo excatly when they pick up. Thanks! UPDATED: I've had a look at the sourc...

Can signals/events from handsfree accessory of Android phone be intercepted?

I have a strange doubt: Is it possible to intercept key presses of the hands free mic/headset(whatever it is called) of an Android mobile device? Thanks. ...

How to rotate an static image in HTML

in my application, i need a static image to be rotated in HTML. Please help me for that ...

find current location latitude and longitude

hii i have a problem.I want to find latitude and longitude of my current location in android application.Its not on location changed . I just need when i am stable with my phone pliz help..thx in advance. My code is: LocationManager locationManager; locationManager = (LocationManager)getSystemService (Context.LOCATION_SERVICE...

In Android, how do I view the error that was received in the try/catch block?

public static void parseit(String thexml){ SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser saxParser; try { saxParser = factory.newSAXParser(); DefaultHandler handler = new DefaultHandler() { public void startElement(String uri, String localName, St...

Creation of buton in an androidi widget

hello, I am trying to write a code for an SMS widget. I wrote something that I can compil, and print on screen my first sms. When I click on next, nothing happend... this my code: package android.MySMSwidget; import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetProvider; import android.net.Uri; import android.os...

How to refresh Android listview?

I want to refresh an Android ListView after adding/deleting dynamic data. Can any one tell me how to achieve this? ...

Passing a JavaScript object using addJavascriptInterface() on Android

Is it possible to pass a JavaScript object from JavaScript to Java using addJavascriptInterface()? Something along these lines: var javaScriptObject = {"field1":"string1", "field2":"string2"}; JavaScriptInterface.passObject(javaScriptObject); How would such a call be captured on the Java side? I have no problem setting up the interfac...

Debug on the Samsung Galaxy I7500 Android Phone

I am having Samsung Galaxy phone and i am trying it to connect to my Vista ,I have installed the Samsung PC suite . When i start the USB debugging on it asks for new driver , i give the path for sdk but still it never worked . The firmware version of phone is 1.5 .I am having sdk 1.6. I have done some changes in inf file but still no luc...

Android Layout Highlight?

How to Highlight the Layout in Android?.. ...

SFTP in android

Hi I want to use SFTP in my android project. Can anybody tell me if android [code]already have SFTP library?? Or i have to implement it. If anybody have already done SFTP client in android then please guide me. Thanks in Advance. ...

Android thread in backgorund

Hi, i'm developing an Android application and i have a problem running a new thread in background. I make a class with this code: public class Downloader implements Runnable { private Vector <DownloadRequest>messages = new Vector<DownloadRequest>(); static final int MAXQUEUE = 5; ApiRequest mApi; public void run() { try { ...

Geocoder class is not working properly in android

my application i am using geocoder class for retriving the location latitude and longtude following is the code addressInput = street+","+city+","+pin+","+country; List<Address> foundAdresses = gc.getFromLocationName(addressInput, 5); first time it is throwing exception like java.io.IOException:Unable to parse response from ser...

How to create a square button that adjusts to list item height?

In a Listview I want create a square button that is as wide as the list item is heigh.I don't want to set fixed width and height as it should work for different resolutions. Is is possible? ...

Set title background color

In my android application I want the standard/basic titlebar to change color. To change the tekst color you have setTitleColor(int color), is there a way to change the background of the bar? ...

RuntimeException during start of intent

hi , I am getting this exception at start of every screen ,irrespective of giving height. java.lang.RuntimeException: Binary XML file line #25: You must supply a layout_height attribute. ...

Using ThreadPoolExecutor and AsyncTask

When using ThreadPoolExecutor can I use AsyncTask as the Runnable in my queue? Or does this defeat the purpose? //A holder for various tasks private final LinkedBlockingQueue<Runnable> queue = new LinkedBlockingQueue<Runnable>(5); //Thread Pool Executor private final ThreadPoolExecutor tpe = new ThreadPoolExecutor(3, 3, 10, TimeUnit.S...

Sending an object to a service through Intent without binding

Is is possible to send an object to an Android Service through an Intent without actually binding to the service? Or maybe another way for the Service to access Objects... ...

getResources for xml is not working

XmlResourceParser xrp = this.getResources().getXml(R.xml.userdata); about code i am using for getting the resources it is not working and through exception System.err(1060): java.lang.NullPointerException System.err(1060): at android.content.ContextWrapper.getResources(ContextWrapper.java:79) ...

Android slide animation problem

I have a 3 horizontal views - an image on the left which is a thin vertical handle-type bar and an image to its right followed by a textview. What I'm trying to achieve is a sliding animation, activated with a click on the handle, so that the center image slides in and out to the left (and so disappearing when fully left) with the textvi...