android

Parsing JSON with GSON

I'm having some trouble with GSON, mainly deserializing from JSON to a POJO. I have the following JSON: { "events": [ { "event": { "id": 628374485, "title": "Developing for the Windows Phone" } }, { "event": ...

android DatePickerDialog

Hello, Is there any way to make DatePickerDialog not dismiss after clicking set button ? ...

Android ACTION_SEND Attached File

When you attach a file to an e-mail using the ACTION_SEND intent (with the extra EXTRA_STREAM) does the e-mail app copy that attached file to its own location? My app creates a file and attaches it to an email, but this can happen many times and I would like to be able to delete this file when it is no longer needed (so it doesn't flood ...

Is there a RAD for Android ?

Anything to help design GUI like a paint program? (Delphi, VB, MSVC, QtBuilder, etc) And anything to help build packages, set permissions, etc? What is there out there to take the drudge work out of Android app creation and leave me free to concentrate on design and development? ...

Calling finish() After Starting a New Activity

The first Activity that loads in my application is an initialization activity, and once complete it loads a new Activity. I want to ensure if the user presses 'Back' they go straight to the Launcher, and not the initialization screen. Side note, is this even the best approach, or would this be better done with some kind of Intent Flag? ...

Android SDK on a 64-bit linux machine

Is it possible to develop using the Android SDK on a 64-bit linux machine. The available SDK downloads seem to be just for 32-bit versions of Linux. ...

keeping references to inflated custom views

Hi While researching how to create custom compound views in Android, I have come across this pattern a lot (example comes from the Jteam blog) : public class FirstTab extends LinearLayout { private ImageView imageView; private TextView textView; private TextView anotherTextView; public FirstTab(Context context, AttributeSet attributeS...

Android XML - how to get items aligned far left, center, and far right

Hi, I have this XML code which generates a button, a textview and another button, How do I go about getting the button to appear in far left, the textview in the center and the last button on the far right? < ?xml version="1.0" encoding="utf-8"?> < LinearLayout android:id="@+id/LinearLayout01" android:layout_width="fil...

What is the equivalent of "colspan" in an Android TableLayout?

I'm using a TableLayout in Android. Right now I have one TableRow with two items in it, and, below that, a TableRow with one item it it. It renders like this: ----------------------------- | Cell 1 | Cell 2 | ----------------------------- | Cell 3 | --------------- What I want to do is make Cell 3 stretch across both u...

Android: Can any launch icon be used, as long as it's 48x48 png?

Hi, I'm finally ready to upload my Android app to the market. I didn't create a fancy icon like it shows at the android developer site. I just made an image that I liked and made it 48x48 png. Will that be ok? ...

how to use Remote Service ?

Hi im trying to use Remote Service btween two simple application, But its not easy to me. So any advice you have will help me. here`s my case. I made one app which is playing Music in service, There are two components. one is Activity controlling service by using three buttons, play,pause, stop. and it is working fine. and a...

Java application design question

I have a hobby project, which is basically to maintain 'todo' tasks in the way I like. One task can be described as: public class TodoItem { private String subject; private Date dueBy; private Date startBy; private Priority priority; private String category; private Status status; private String notes; } As...

Android Location Error

I've singled out my problem to a few lines of code lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE); Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER); lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000L, 5.0f, this); lat = location.getLatitude(); lng = location.getLongitude(); //lat = n...

AsyncTask Threading Rule - Can it really only be used once?

In the documentation on AsyncTask it gives the following as a rule related to threading: The task can be executed only once (an exception will be thrown if a second execution is attempted.) All this means is that you have to create a new instance of the class every time you want to use it, right? In other words, it must be done like ...

Android application preference in device setting opinion

How can I add application preference in device setting. I want to my preference setting be part of device setting opinion. My application setting can be appeared or displayed in device setting list. Any API i need to use or keyword? ...

Programmatically forward-lock an Android APK

Doing a bit of advance research, and am stuck on the point summarized in the title. Namely, is there any way to forward-lock an APK installed programmatically, from another app? I've not come across anything beyond a hint in the following post: http://groups.google.com/group/android-developers/msg/e39941389d4a4cf8 I can't see anyth...

Out of memory error

Hi, I am trying to retrieve a list of images and text from a web service. I have first coded to get the images to a list using Simple Adapter. The images are getting displayed the app is showing an error and in the Logcat the following errors occur... 04-26 10:55:39.483: ERROR/dalvikvm-heap(1047): 8850-byte external allocation too large...

How to add padding for background image

Hi, I have a linear layout which has a background image (a 9 patched png file). How can I add padding to left and right so that the background image does not take up the whole width? I have tried 'android:paddingLeft' and 'android:paddingRight', but that does not change anything. <LinearLayout xmlns:android="http://schemas.android.com...

how can i get my application shortcut to show up in the device

I am using Activity-alias in AndroidManifest.xml to specify another entry point to my application using shortcut. I am seeing the shortcut in the shortcut list. How can I get my 2nd icon (shortcut) to show in the Home? ...

I need help with Widget and PendingIntents

Hi, I've asked here a question about Task Killers and widgets stop working (SO Question) but now, I have reports of user that they don't use any Task Killer and the widgets didn't work after a while. I have a Nexus One and I don't have this problem. I don't know if this is a problem of memory or something. Based on the API: A Pendi...