android

Pass reference to another activity - Android

Hello! I am very new to android, so I am experimenting with the tutorial code. In particular, the notepad. If you look here: http://developer.android.com/resources/tutorials/notepad/notepad-ex2.html, at Step 5 they are putting values so that it can be used by NoteEdit. I would like to pass a reference of NotesDbAdapter into NoteEdit ...

Android: Retrieve contact name from phone number

I would like to retrieve the name of a contact associated with an incoming telephone number. As I process the incoming number in the broascastreceiver having a String with the name of the incoming caller would help my project greatly. I would think this involves a query using the sql WHERE clause as a filter, but do I need to sort the c...

Android - Using Camera Flash

Hi, I am developing an android application in which i have to work with camera flash. The application is something like, when i get let say SMS, the camera flash will flash for 5 times, whn i get an incoming phone it will flash for 7 times, something like that. I have searched a lot but i m not getting the exact solution about how to ...

Android: Trouble declaring intent to be fired from a pendingIntent in a notification; done in a broadcastReceiver

I would like to send a notification in a broadcast receiver. the notification should launch the default sms app. Ultimately I want to create my own notifications for incoming text messages consistent with what the deault app, Handcent, and Chomp do. I have the code to detect the threadId of the incoming sms. How can I craft the intent...

Android: Disable recent apps intent

I want to disable the recent apps intent that is fired from the icon when you hold the home button. I am currently detecting, in the onCreate(), if the intent is fired from the quick launch dialog, and then I call finish(). This entails that when the application goes to the background finish() is called so that when the app is launched ...

Android: run 2.0.1 app on 1.5 emulator in Eclipse

Hi everybody, In Eclipse, I have set my project's target build to 2.0.1 (right click on project folder -> Properties -> Android). In my AVD manager I have a number of emulators - one for 1.5, one for 1.6 and one for 2.0.1. How do I tell Eclipse to run the project (built to 2.0.1) on the 1.5 emulator? The "Run configurations" menu gives ...

Installation pop-up perior to the download . how ?

Hi, I wanna implement a download-and-install mechanism. I have a source link where my app gonna download from, an apk file. Ive managed to do it, but i payed attention to the fact, that it first download then when it finish downloading it pop up an installation window and then install. now this this can interrupt the user, if he is in...

Custom Notification

I would like to know if there is a way of using the notication bar in order to do some operations (onClick), without having an activity being launched/resumed. for example.. let's say i raise a notifcation, and when the user press on it, then instead of take me to some activity, it invoke some regular method in my current activity/servi...

Creating an options menu that is available to all Activities in an application

I want to have an options menu that is available to all Activities in my app (on pressing the MENU button). I've been doing this by creating it in onCreateOptionsMenu(Menu menu) for each Activity but this seems redundant. Is there a way to create it in one place and have it available in all Activities? ...

How can we add different sound to spinner (music play)

I would like to create am timer application(with alarm) for android mobile . I can able to make timer with one sound. By storing the .mp3 in Raw folder A drop down which contain sound list would be interesting. Bt in android their is no drop down option. I found Spinner is helpful in this. Problem:= How can we add different sound to ...

Cannot get my Custom Android View to display

Hi, I am trying to create a custom control which does nothing except decorate the text which is displayed. When I reference this class inside the main.xml like all the examples which I am reading and deploy this to the emulator, the widget just says "Problem Loading Widget." I am beginning Android development and just trying to under...

sql android something seems to b wrong how do you deduce from a cursor the query status

i have this code : private void insertValus() { ContentValues initialValues = new ContentValues(); for (int i = 0 ; i < COUNTRIES.length ; i++){ Character tmp = (Character)COUNTRIES[i].charAt(0); initialValues.put(VALUE, COUNTRIES[i]); initialValues.put(TYPE, "country")...

Android App with multiple views - Best Practices?

Hi, I am new to developing for android. I have a question regarding some best practices. My app is like a dashboard from which multiple different "sub-activities" can be started and done. I am wondering what is the best way to structure the app. One way is to have different layouts and load and unload them appropriately. The other is ...

Android: ScrollView force to bottom

I would like a ScrollView to start all the way at the bottom. Any methods? ...

Android Eclipse Error: "Gson cannot be resolved to a type"

I'm relatively new to Java, eclipse and android so this could be a completely silly question, but I'm going to ask it none the less. I've got a project I'm learning with to test connecting to the flickr api and simply displaying recent images. I'm at the point now where I want to parse the JSON received from flickr. I've downloaded gso...

How to transition between data in a single dynamic view in Android.

Let me start out by saying that I feel like there should be a very simple way to do this, and it's entirely possible I'm missing something very simple. But all the examples I find for transition animations (push left out, push right in, etc.) deal with moving from one view to another. What about an application that only has one view, but...

Removing a View from an Activity

You've got a View defined in a layout file. How do you remove it from you Activity code? ...

Equivalent of com.google.android.maps.ItemizedOverlay.populate() for OpenStreeMaps (OSMDroid)

Any idea what's the equivalent of com.google.android.maps.ItemizedOverlay.populate() method in case of OpenSteeMapViewItemizedOverlay ? ...

Android App Templates?

Are there Android app templates, similar to the iPhone SDK templates? ...

Android Composite Widget -Static or Dynamic - Comments

I have a ListView with hundreds of rows sorted A to Z. I'd like to create a Composite Widget located on the right with TextViews labeled A to Z. Touching each TextView will filter the ListView and only display records that start with the letter of the TextView. For example, touching C will filter all rows and only display items that s...