android

Eclipse Clean Up and Formatting settings for Android application

I’m looking for a settings file that is customized for Android development, can you point to any? ...

Multiple calls to AlarmManager.setRepeating deliver the same Intent/PendingIntent extra values, but I supplied different ones

Solved while writing this question, but posting in case it helps anyone: I'm setting multiple alarms like this, with different values of id: AlarmManager alarms = (AlarmManager)context.getSystemService( Context.ALARM_SERVICE); Intent i = new Intent(MyReceiver.ACTION_ALARM); // "com.example.ALARM" i.putExtra(MyReceiver.EXTRA_ID...

How to show a live Presentation from an Android phone?

This is not closely related to programming stuff, so I marked as community wiki. I am wondering how can I show a live Presentation from an Android phone? I want to put on a big screen my app, while I am presenting at a conference. I will directly interact with the phone during the presentation and I want the mobile screen visible on th...

How to define GPS module in Android?

I'm porting android to Devkit8000 which is a BeagleBoard clone. I have a GPS module connected on /dev/ttyS0. I could successfully get NMEA output when writing "cat /dev/ttyS0" in the terminal emulator. I want to know how to let android know that there is a GPS module on /dev/ttyS0 and it is outputting NMEA standard? To be able to use th...

Passing arguments from loading activity to main activity

I'm writing an application that starts with a loading activity. In the loading activity the app requests html from web and parses the html, then it sends the parsing result to the main activity. The main activity has several tabs, and contents of these tabs are based on the result of parsing. For example, the result of parsing is a list...

Dynamically changing layout

I have a 2 x 2 grid of buttons. Each row of 2 is wrapped in a horizontal linear layout. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="100dip"> <Button android:layout_weight=".5" android:id="@+id/btn1" android:layout_w...

Communicate progress from local Service

An application I'm building uses a local Service for downloading files from the web to the phone's SD card. In this app users can browse lists of books, and read them while online. A user can also download a pdf copy of a book for offline viewing. To handle downloads I'm using a locally bound Service. I do not want this Service to run a...

Android Layout: Why don't the TextView and a ToggleButton align

I'm trying to put a TextView and a ToggleButton in a table row, however, they don't seem to align (The top of the button starts about 10px below the top of the textview even though the height each element is the same. Can anyone tell me why? <TableLayout android:layout_width="fill_parent" android:layout_height="wrap_con...

Where do I find a list of officially supported mimetypes for Android?

I found out that on Android contacts, at least HTC Sense stores Facebook ID with the following mimetype: vnd.android.cursor.item/vnd.facebook.profile this differs from their mimetype format such as com.htc.socialnetwork.facebook/smallavatar I am wondering where do I find a list of officially supported mimetypes for Android? ...

Annoying line to the right of the screen when using TableLayout

I'm using a TableLayout for an Activity and if I have more than a certain number of TableRows a vertical line appears to the right of the screen. If I use fewer Views in my layout, the line disappears. If this is not a bug, where should I look in my layout for problems? ...

Android Zoom Controls keep zooming in and will not stop

My zoom controls keep zooming in when I press the button, and will not stop, am I missing something? zoomControls = (ZoomControls) findViewById(R.id.zoom); zoomControls.setOnZoomInClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mc.zoomIn()...

How do I parse JSON from a Java HTTPResponse?

I have an HttpResponse object for a web request I just made. The response is in the JSON format, so I need to parse it. I can do it in an absurdly complex way, but it seems like there must be a better way. Is this really the best I can do? HttpResponse response; // some response object Reader in = new BufferedReader( n...

Intent.putExtras not consistent

I have a weird situation with AlarmManager. I am scheduling an event with AlarmManager and passing in a string using intent.putExtra. The string is either silent or vibrate and when the receiver fires the phone should either turn of the ringer or set the phone to vibrate. The log statement correctly outputs the expected value each time. ...

How to make executable version of software in Android?

I am almost done with my project in android, now I want to make the executable version of the application. I need to demonstrate it in .exe form as soft app as on emulator, not by built and debug process from eclipse. ...

Android preference, does it have to be unique?

For my private static final String PREFS_NAME = "mypref"; does the PREFS_NAME have to be unique for every application? Or can I use the same one over and over. ...

Android Time&Date Picker

Hello, Is there any android widget that enable to pick the date and the time at the same time ? I already use the basic date picker and date picker: http://developer.android.com/guide/tutorials/views/hello-timepicker.html http://developer.android.com/guide/tutorials/views/hello-datepicker.html but they are not that sexy and user friendl...

Best and simple way to handle JSON in Django

Hi, As part of the application we are developing (with android client and Django server) a json object which contains user name and pass word is sent to server from android client as follows HttpPost post = new HttpPost(URL); /*Adding key value pairs */ json.put("username", un); json.put("password", pwd); StringEntity se = new Str...

Android googlemap Out of memory

Hi, I made an android application with googlemap api, and draw some 16x16 png (about 200 count) on overlay. When I move or zoom on/in mapview, "out of memory" error occurs very often. I also used the googlemap appication in my htc itself. Seams that it uses about 14+MB memmory, and never happens "out of memory". How to save memmory usa...

How to use Selector when click a item in list

I occur a problem when develop a application on android. There have two image which can be download from server in a list item, it will show one image and will show another image when user select or click this item . if I try to download another image from server when user click it,the user will never have time to see it, for this time ...

Automatically add "More..." Tab in Android

Hi, all I'm writing an application which contains many tabs, and sometimes the number of tabs may exceed five. So I want to make it behave like iPhone, which is, move additional tabs to a "More..." tab. I would like to know if this feature is supported by TabHost, or if there is any existing open source widget which can do the favor for...