android

how to rename existing menu item ?

Hi guys. Do you know how to rename existing menu ? I can rename when press menu item. But I don't know how to access to menu item when press the button. Please advice. ...

Eclipse/Java - Values in R.string.* return int?

I thought I'd be classy and use the string.xml file to define some constant strings for things like exception messages. In strings.xml I hit Add, chose the "String" option (not 'String Array'), then gave it a name and value. I was surprised to see that this code doesn't work: throw new Exception(R.string.MyExceptionMessage); And tha...

Android Jar libraries

How do you setup a project that can result in a jar library file that can be used for android? I want to create a custom library across all projects. Few other questions: Does it need to be compiled against a specific version of android sdk? When an android package is compiled against a jar library does the classes necessary to work w...

Best android layout for a set of columns

On an Android layout, I'd like to have a set of rows, each with two TextViews. The leftmost column of TextViews should be right-aligned, just left of an imaginary centerline down the screen. The rightmost column should be left-aligned. Examples of this can be seen at http://stuff.greenberg.org/ScopeCalc.htm What's the best layout to u...

How to send data from Android mobile devices to the Google App Engine datastore?

I need to write an application that sends data to the Google App Engine from Android. The data that I would like to send can be described by a typical database record. Each record has some integers, strings, dates, etc. I would like to keep the connection details hidden/secured so that someone can't create false data in the datastore,...

onActivityResult doesn't work ???

Hi guys. I am facing with a problem related startActivityForResult() To start SecondActivity from FirstActivity : Intent intent = new Intent(); intent.setClass(FirstActivity.this, SecondActivity.class); intent.putExtra("key1", "12345"); startActivityForResult(intent, 0); And handles result : @Override protected void onActivityResul...

Use Application class for global variables

Is there any reason not to use the Application class to share variables across Activities? For instance a handle to the DB or a single HttpClient. ...

Android content saving

Hi again friends... i have a wierd problem... As i have asked in previous posts... i have a lot of data coming from NET in my app... The problem is that a lot of text and images r there... so though i can make the user wait wen he clicks on a list item, but i dont want to make him wait wen he clicks the back button... In the sense that...

Application Install Unsuccessful-while installing app viaOTA

Hello All, I have developed an application using Android SDK 1.5, application works well on Android Simulator. Now, I am trying to install application on actual device. I don't have the Android device. So, I am going by OTA way. For this, I have generated the self sign keystore using keytool utility. And, using Eclipse's "Eclipse Signe...

android tabs - starting a new activity

guys im in deep trouble again... i have 4 Tabs in a TabHost... let them be A,B,C,D.... now each one is just an index page and clicking on any of them shows a different activity... The problem is that i need to start another activity wen user selects something from the content displayed in the tab... The other activity should also be di...

Android performance testing

The test cases on launch performance in android source code are extending android.test.LaunchPerformanceBase but i can not able to make use of that class in my application test cases... Do anybody knows how to make use of that class? These performance test cases are present in development/apps/launchperf, please look into these test cas...

Android: VideoView makes the gradient background look grainy

Consider following main.xml: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/app_background_gradient"> <VideoView android:id="@+id/VideoView01" android:layout_width=...

How do I create a custom button field?

I want to create a custom field on which I can place more than one line of text as well as images. And the field can be used like a button(onclick event etc.) ...

android simplecursoradapter not updating with database changes.

I have an android list activity that is backed by a database cursor through a SimpleCursorAdapter. When the items are clicked, a flag field in the coresponding row in the database is toggled and the view in the list needs to be updated. The problem is, when the view that's updated goes off screen and is recycled, the old value is ...

gridview problem...part two

sorry for asking this question again but i didnt get much help on the last one (maybe due to the holidays or because my question was a bit confusing). im trying to load images from the "drawable folder" into a gridview. unlike the "hello android gridview" tutorial i dont know the name of the images being loaded into the gridview (as th...

ListActivity with checkbox in Android

I am trying to use ListActivity and a SimpleCursorAdapter to check boxes based on a query from a database. The cursor is a list of questions and answers. If the user has already answered a question the checkbox should be checked but they aren't checked. The code looks like this: protected void onCreate(Bundle savedInstanceState) { s...

Setting Ringtone in Android

I have sounds files in my res/raw folder and i want to select a sound to set as a ringtone on the click of a button. Wonder how can i do that? ...

GridViews inside a Gallery

Hi, I am trying to essentially reproduce the default sliding home app screens, using a fullscreen gallery to hold multiple fullscreen gridviews - one for each 'screen'. This seems great in theory, except that you cannot drag the gallery, once focused on a gridview. I would think that touching open areas of the gridview (i.e. padded or ...

IIS 7.5 FTP 550 Error for No Reason

Before describing my problem, let me go into the configuration. I bought an Android phone and thought that it would be a great idea to access my personal files at home on my Windows 7 Professional 64 bit computer from anywhere. I setup IIS 7.5 to create an FTP site for my user directory (C:\Users\MyUser). Permissions are set to read-on...

How to query the MMS Log in Android

In my app I need to query both the SMS and the MMS log to get the history of all incoming and outgoing messages. This code has worked wonderfully for SMS: Cursor c = cr.query(Uri.parse("content://sms"), null, null, null, null); But when I try the following I get completely different results: Cursor c = cr.query(Uri.parse("content://...