android

How to reduce the tab bar height and display in bottom

Hi can anybody tell how to reduce the height of tab bar and display tab bar in bottom Thanks ...

AsyncTask doesn't run sometimes despite state being RUNNING?

In my application I use an AsyncTask on start up of my Activity to fetch the ringtone of a particular contact. It works normally but I have noticed that if the application is stopped twice before the AsyncTask gets to the doInBackground method then when the Activity starts again the AsyncTask fails to run properly, only getting to the o...

Android Widget, not clickable

Hi All, I am new to Android Dev, and this is my first widget. What is supposed to happen is when the user clicks the widget, it turns off or on the Master Sync option. However the widget does not do anything when clicked, and appears to not be clickable. This is the body of the .java code, if it helps to post any of the other code ple...

How to save cursor in activity?

Hi everyone, I'm population my listView using Cursor, but when I navigate away from my activity and then return back my listview is empty. Here is my code: @Override public void onCreate(Bundle savedInstanceState) { ... DBAdapter db = new DBAdapter(context); db.open(); Cursor c = db.getAll(); db.close(); startManagingCursor(c); Stri...

Android: Redirect outgoing calls

I'm trying to redirect outgoing calls to a different phone number on an Android device. So, I use a BroadcastReceiver "listening" for the NEW_OUTGOING_CALL intent, on his onReceive() method I use the setResultData() method to change the phone number. Like this: public void onReceive(Context arg0, Intent arg1) { setResultData("3519...

yet another sipdroid build question

Hello I am trying to build sipdroid under eclipse,I have downloaded the source from the svn found on the site and I followed the instructions found on the build.txt file. In the second step saying to execute ant debug the ant script fails this is the output of the console: [maxsap@localhost sipdroid-read-only]$ ant debug Buildfil...

android.speech.action.RECOGNIZE_SPEECH" activity not found

I use this code for voice recognition and it only work on HTC Desire on android OS 2.2 but it doesn't work on samsung galaxy S android 2.1 or Motorola Mile Stone. does anyone know why this happened? PackageManager pm = getPackageManager(); List activities = pm.queryIntentActivities( new Intent(RecognizerIntent.AC...

Layout with dynamic position

Hi, I have a layout which might be a bit unusual. The structure is the following: <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <org.CustomSurfaceView android:id="@+id/page_flip"...

some classes are missing !!!

Any one have idea about android.net.http.EventHandler; android.net.http.Headers; android.net.http.RequestQueue; I m trying to build an Android Twitter Integration app. I m not getting this package classes. ...

android: how to bind a sub-class to a service

I have a class the extends relativelayout. This class is inflated and added to a view by an activity. This class needs information from a service that I've created. What I'd like to do is bind the class to the service on its own thread but I'm not sure how to do it. When I try and call bindservice in the class I get a "method is not appl...

Populating data on gridview

Hi all, In my android app, i have a particular scenario, for one of the screens. I require 2 button,one on each side of the corner(left and right). Below this i want to populate data in a control. If left button is clicked, the control should be a gridview. If right button is clicked , the control should be a listview. And accordingl...

How can I show the latest append text on textview?

I working on a chat app. Whenever I submit or receive a text message, I append them to the chatbox. When the list get longer, I need to scroll down to see them. How can I make it to autoscroll to the newly append text? <ScrollView android:id="@+id/scrollView01" android:layout_width="fill_parent" android:layout_height="100p...

Trying to list Android Bookmarks showing History as well

Hi Everybody, I'm trying to list the system default bookmarks but when I run the app, it list not only the bookmarks but also show History URLs and Most Visited URLs. How can I avoid this and show only the bookmarks? here is the method: (imported everything necessary + permissions valid) public class CLASSNAME extends ListActivity { ...

What is the Android rendering lifecycle?

There's a decent amount of information out there on the Activity lifecycle. But I'm surprised how difficult it is to find a comprehensive description of the rendering lifecycle. By that I mean the order and rules by which a tree of nested activities, views, and drawables get to be sized and drawn to the screen, and the points at which ...

How to use xauth for twitter-client in android?

Dear All I am making an application that will work like twitter client. i tried many ways using Oauth Connection. i Registered my application to twitter. but i want to use xAuth instead Oauth. so please provide me a sample code which connect my application to twitter using xauth. i already mailed my application details at twitter for ...

Best practices of working with multiple sqlite DB tables in Android

Hi guys, in my android app I use a DB with multiple tables, I have an XML parser which needs to write data to 2 tables while parsing. I created 2 DBadapters for 2 tables, but now I have a problem. When working with one table it's easy, I can do: FirstDBAdapter firstTable = new FirstDBAdapter(mycontext); firstTable.open(); // open and ...

Is there a way to debug Android kernel code?

I've got some trouble with the media backend (mostly Stagefrightplayer) in Android, and I'd like to understand why it throws the errors it does. The errors are usually device spesific, so debugging on an emulator wouldn't be sufficient. Example: I/AwesomePlayer( 147): mConnectingDataSource->connect() returned -1004 V/MediaPlayerServi...

Android: buffer blocked until process exited

I have a problem with blocking buffer with the following code on my android application: else if (tcpdumpButton.isChecked()) { try { Process process1 = Runtime.getRuntime().exec("tcpdump"); BufferedReader osRes = new BufferedReader(new InputSt...

Adding native Binder service permission error when not root

What is the best way to add a new native service that uses Binder and can get past the service_manager.cpp restrictions on what users can add services? I have created a new native service that is similar to the MediaPlayer. I make the addService() calls to add the Binder service to the system. This worked fine when the service was start...

Why is android restarting my activity when I call finish() on it?

I have an activity that after some user interaction calls finish() on itself. From time to time it gets into a loop where when it calls finish() it finishes but immediately restarts again. Any idea why android tries to restart my activity? ...