android

How to Create C header file using Javah tool

Hi guys i am using android ndk and for that i am trying to create a c header file using javah tool how to use and where to use this tool i am unable to understand so please any one can tell me the procedure how to do that i am waiting for the reply please......... ...

How to get the data buffer of screen in screen stack in Android?

Currently I want to develop one Activity to allow the user to see the screens/activites of all running tasks , then the user can select one of them to switch it to foreground. As I known, HTC Sence seems already to have this implementation for Home screen, to display the thumbnail of all Home panels in one screen. Does anybody know how t...

Android setImageURI out of memory error

I have a very small activity that must show an image. If picture is not very small (for example 1.12 Mb 2560x1920) it produces out of memory on change screen orientation. I tried getDrawable.setCallback(null) but no luck. Where am I wrong? public class Fullscreen extends Activity { @Override public void onCreate(Bundle savedInstanceS...

How to read cpu frequency on android device

Is there any Java API for that? How can I read this information. ...

Toggle WIFI radio programatically

Hi, Is it possible to toggle WiFi radio (On/Off) programatically on android phones? thanks! ...

Making Overlaid image transparent on touch in Android ?

Hi All, I need help on making the touched areas of bitmap image transparent(seems like erasing) while I am moving my finger on that image. I am having a PNG file with Alpha channel in it. I want to turn the touched pixels to transparent so that, the user can feel that he is actually erasing it. For this I am using frame layout to load ...

Android: Is it possible to have a scrollview in a flipper in a tabview?

I have a TabView and on its first tab I have a ViewFlipper displaying two pages of ImageButtons (say buttonsPage1 and buttonsPage2). When in landscape orientation, I need the image buttons pages to be scrollable, so I tried to add a ScrollView on buttonsPage1 and another on buttonsPage2. I get a StackOverflowError. I tried then to sup...

Triggering an application on the arrival of a message(sms) in android phone

I want to trigger an application after the arrival of the sms. I using android based mobile phone. Can any body help? ...

Custom component which displays voice recognition button if available

Hi evereyone, I'd like to create a custom component which supports voice recognition. It will primarily be an extended EditText which should show the microphone button for voice recognition if it is available. I wanted to to look at the search app-widget on the homescreen but I don't find it in the source. This is intended to use the v...

Zoom out Problem on webview in Android 1.6?

Hi folks, In web view, the overview mode method does not works in Android 1.6. Because of the API Level restrictions. is there any possible to show the web view in zoomed out completely? Any Idea? WebSetting.Zoomdensity is available in API Level 7 only. ...

how to add language support to android

hello i hope someone put me on the right direction with my problem i want to work on supporting my language, specially the writing on android we use Arabic characters with little modification ( like parsi, urdu etc).. i was hoping android has fully supported Arabic , then i would make changes to work with my language. but even 2.2 dos...

get Phone numbers from android phone

Hi! First of all i'm sorry for my english... I've a problem getting phone numbers from contacts. That's my code import android.app.ListActivity; import android.database.Cursor; import android.os.Bundle; import android.provider.ContactsContract; import android.widget.SimpleAdapter; import android.widget.Toast; import java.util.Array...

How to load a Java class dynamically on android/dalvik?

I'm wondering if and how one can load dex or class files dynamically in dalvik, some quick'n'dirty test function I wrote was this: public void testLoader() { InputStream in; int len; byte[] data = new byte[2048]; try { in = context.getAssets().open("f.dex"); ...

How to send a JSONObject to a REST service?

Retrieving data from the REST Server works well, but if I want to post an object it doesn't work: public static void postJSONObject(int store_type, FavoriteItem favorite, String token, String objectName) { String url = ""; switch(store_type) { case STORE_PROJECT: url = URL_STORE_PROJECT_PART1...

Cannot get Correct month for a call from call log history

I am trying to extract information from the call log of the android. I am getting the call date that is one month back from the actual time of call. I mean to say that the information extracted by my code for the date of call is one mont back than the actual call date. I have the following in the Emulator: I saved a contact. Then I mad...

Updating Android Home Screen TextView

Hi, How can we update the View of a Home Screen Widget on the onReceive method of AppWidgetProvider?. I am trying to update the TextView of my Home screen widget but it seems that I cant access the TextView of my AppWidgetProvider on onReceive method. Here is a sample code of my onReceive public void onReceive(Context context,Intent...

Why isn't the SQLiteOpenHelper called just SQLiteHelper?

The documentation describes the class as a helper object to create, open, and/or manage a database. Having that in mind wouldn't you say that the name is a little misleading? ...

How to implement/debug a sensor driver in ANDROID

Does anyone know of a walk-through or any examples of any code to setup sensors in android. I have the drivers available to me. Also i have implemented the sensors library as instructed in the Android-Reference along the sensors.h template. I am still unable to get any response at the apps level. How do i trace this issue? what might...

Cannot get same Contact Number from Call log and Contact History in Android

Hi, I am trying to search for a particular contact number in call log and in contact book of the android phone. But I found that the contact number are stored in different way in contact book and call log. For e.g. I have a contact number 9889880912 to search in the call log and contact book. To do this, I do the following: add a con...

Android 2.2 wifi hotspot API

What is the API call I need to make in Android 2.2 (Froyo) to create a Wifi hotspot (as seen in the Tethering and Portable Hotspot settings item). ...