android

How to set a EditText in a certain column of a TableLayout?

I have a TableLayout on one Android Activity UI. It has two columns. Now I need to add a new row, and put an EditText box in second column of that new row. And also, I want that EditText full fill the whole cell. I have some code like this: TableRow tr = new TableRow(context); EditText et = new EditText(context); et.SetMaxLines(4); etT...

Call trace in Android

I want to know how to do method tracing for Android applications. I mean, a sequence of calls on each object, not a stack trace. It's very similar to this question (Call trace in java), but on different platforms (jvm-PC vs dvm-Android). I have no control over the start arguments of dalvik, thus I cannot specify a java agent (or am I wr...

Android: Creating a Scrollable Layout

I'm trying to create a "scrollable" layout in Android. Even using developers.android.com, though, I feel a little bit lost at the moment. I'm somewhat new to Java, but not so much that I feel I should be having these issues--being new to Android is the bigger problem right now. The layout I'm trying to create should scroll in a sort o...

Android AVD on Eclipse shows 'Blank Screen' with no activity

Hi All, When I start my AVD emulator, the emulator just shows blank screen with 'android' written at the center. I waited for half an hour but nothing changed. I am using Android sdk 2.1 and Eclipse 3.5 Please help. ...

identifying id of listitem for contextmenu

I have a View that extends Activity. A ListView will display a number of listitems. When the user long clicks I would like to present them with a contextmenu allowing them to select edit, delete etc... and then identify the listitem that was selected as the item to perform the action on. In onCreate I have: listView.setAdapter(adapter)...

Android & SQLite: "Table audios has no column named downloaded"

I get this weird exception when i run my app on both the emulator and a USB connected device. i can see the table inside the shell, but when I try to insert a record from the Activity acton I get this exception: android.database.sqlite.SQLiteException: table audios has no column named downloaded I am mostly running on an emulator with...

android : sax Xml parsing

Team, I am facing some issue at the time of parsing the XML, but the same works in Java program... When I run the same code through android prgming its failing to parse... InputStream byteArrayInputStream = new ByteArrayInputStream( response.toString().getBytes()); SAXParser parser = SAXParserFactory.newInstance().newSAXParser...

How can I access Android private API's which doesn't exposed in TelephonyManager?

Hi, I'm newbie in Android. I intend to write tests related the Phone and Direct SIM write. What are the alternatives in case the required API's does not exposed in TelephonyManager but exist as private APIs in PhoneBase.java or PhoneFactory.java or CommandInterface.java? examples: 1. What is the "replacement" for: mPhone = PhoneFa...

How to input ampersand(&), asterisk(*) and other characters in android 2.1 emulator?

I'm trying to add a new account in android 2.1 emulator. When I'm entering my password, I found it's impossible to input some symbols, such as #,$,&,*, except @. For example, while I press shift+7, only 7 is shown in the password textview. Any suggestion? ...

GPRS connection still connected while receiving phone call??

Suppose one application is running which is using GPRS connection. If in between that if call comes what will happened with that GPRS connection?? It still persist or it is get disconnected?? Thanks ...

How to open "front camera" on android platform?

More generally, If a device has more than one camera, is there any way to initializing it? I didn't find it in android reference doc. Samsung SHW-M100S have 2 cameras. If there is no reference to use 2 cams, Any idea how samsung did..? ...

Animate and Move ImageButton or ImageView in Android

Hi.. I am new to Android. I am trying to create a game application. I want to swap two ImageButton or ImageView with animation , ie i have to show the visual effect of interchanging the image from one posotion to another position. Can any one help me.... Is there any other possible way to achive this. ...

android radiobutton disabled

If I create a checkbox view and call setEnabled(false), the checkbox look is grayed but if I create a radiobutton, the view is inactive but it is not grayed. Any idea ? ...

android disabled view are focusable

When I disabled views such as radiobutton or buttons with the setEnabled method, the views are still focusable but with view such as EditText they are'nt... I need to call setFocusable(false) if i want that all my views don't receive focus when they are disabled ? ...

Android - How can I find out how many unread email the user has?

I'm writing a program that should display the amount of unread sms, mms, phone calls and emails. It was quite easy to find how to query for sms and phone calls (I used the search on this page) but I have not been able to find out how to query for emails. Is there anyway to find out how many unread emails the user got in their phone? ...

How to vertically align text in a button with a background drawable?

I had a simple button set up with a background image defined like android:background="?attr/button" where ?attr/button was a reference to a simple 9-patch png. Everything worked fine, text in the button was aligned correctly. Then I needed to have a different background for a pressed state of the button. So I changed that to android...

How to accept an incoming call by clicking a button?

HI, all! I'm trying to implement my own phone call handling UI. What I want to do is, if a call comes in, the incoming telephone number and a picture are displayed, and, if I press a button, the incoming call will be accepted/answered. The related codes are: @Override public void onCreate(Bundle savedInstanceState) { super.onCre...

How to know if my app is available in android market with all versions ?

I uploaded an app built with 1.5 SDK into market, but someone told me they can not find it in the market in their phone. I do not know why, because I have test it in 2.1 emulator. Then how to know if my app is available in android market with all versions, is there any url to test that? ...

Android Cursor strange behaviour

After many houres of bug searching in a big app, I have finally tracked down the bug. This logging captures the problem: Log.d(TAG,"buildList, DBresult.getInt(1): "+DBresult.getInt(1)); Log.d(TAG,"buildList, DBresult.getString(1): "+DBresult.getString(1)); Log.d(TAG,"buildList, DBresult.getInt(4): "+DBresult.getInt(4)); Log.d(TAG,"build...

Open another application from your own (intent)

I know how to update my own programs, and I know how to open programs using the a predefined Uri (for sms or email for example) I need to know how I can create an Intent to open MyTracks or any other application that I don't know what intents they listen to. I got this info from DDMS, but I havn't been succesful in turning this to an I...