android

Activity with ProgressBar -> Service -> AsyncTask for downloading - but how to update the progress?

Hi, this is the current state/situation: I have an Activity which binds a Service which creates AsyncTasks which downloads various web resources. That works well, but of course the ProgressBar shows nothing. Previously i had an Activity which created an AsyncTask which downloaded some stuff. The AsyncTask got the View which holds the P...

android: set up simplest opengl es app.

hello, i am looking for some sample code or tutorial that sets up the most basic opengl es application. for example, just do glClear() in the renderloop. i have already been searching the web but all i found was either out of date or too much and too complicated. thanks! ...

Is there a way to stop all MediaPlayers?

Hi Everyone, I am currently developing my first Android application by reading Dev Documentation at Android official website. What I am trying to accomplish is to play some ring sounds. A section from my code is: import android.app.Activity; import android.media.MediaPlayer; import android.os.Bundle; import android.view.View; public c...

android sdk wants libc 2.4

My OS is debian etch. The tools want glibc 2.4. Etch comes with 2.3. I've downloaded the glibc 2.7 and pointed the adb and the avd at this glibc. The EXE's throw a segmentation fault. I looked at re-building the droid sdk on my box but the pre-requisites, like git 1.5, have un-available dependencies themselves. Any suggestions before I u...

How to delete delayed messages before they arrive at a Handler?

My Problem is that I need to send messages with a delay of 1 second. The handler then initiates some action, you're getting the picture. There are nevertheless some conditions in which the already sent message should be deleted ( before the second elapsed ) to prevent the handler from doing anything. I couldn't figure out how to do thi...

Is a signed Android APK-File running on x86- and ARM-Android devices?

Android APK-Files are not binaries but byte-code-files. So is it possible to install the same APK-File on both - on x86-Android-Devices and ARM-Android-Devices? There are some x86-Netbooks with Android installed planned and I wonder if it is possible to run the APK-Files on both kinds of devices? Best regards, Tom ...

Android equivilent of application.config?

Is there an Android equivalent of .NET's application.config? I am currently using a values XML file for a similar effect, but this doesn't seem to be the right approach. I looked into using SharedPreferences, but I need to access some settings outside of activities. ...

Managing database connections in an Android Activity

I have an application with a ListActivity that uses a CursorAdapter as its adapter. The ListActivity opens the database and does the querying for the CursorAdapter, which is all well and good, but I am having issues with figuring out when to close both the Cursor and the SQLiteDatabase. The way things are handled right now, if the user...

Post information to server and receive XML

On my web server I will be creating a bespoke XML file for a client app to access. This means I must authenticate the client and then give the client the XML file. I believe the client application will need to post data (login, password) to the server and once a connection is established, it will receive the XML file from the server (m...

Sound Effects/Manipulation?

Hello, I am creating an android app that basically records an applies an "Effect" on the audio track then plays it back. I got my app to record an play back but I am stuck an not sure where do go from here. I have been Googling for days now trying to find a open source audio library or some way to change the audio after I record it. ...

Launch activity at certain time

Hi, I'm new to Android development, so I might be missing something obvious. I want to launch an activity when the user's phone clock hits a specified time (similar to an alarm). However, I'm not sure how I would go about doing this as constant polling of the clock seems inefficient and a waste of resources. Do I need to capture broadc...

Android - Playing mp3 from byte[]

I have my mp3 in byte[] (downloaded from service) and I would like to play it on my device similar to how you play files: MediaPlayer mp = new MediaPlayer(); mp.setDataSource(PATH_TO_FILE); mp.prepare(); mp.start(); But I can't seem to find a way to do it... I wouldn't mind saving file to phone and than playing it, I am just hopi...

How to programmatically get the devices IMEI/ESN in Android

Hey all, I'm developing a little program which syncs some of the users data from my app on the cloud (just a load of strings, but that's not the point). To help identify each device uniquely I would like to use the IMEI (or ESN number for CDMA devices) ...so here is the question, does anyone know how to access this programmatically? T...

Android - How to set a named method in button.setOnClickListener()

Most samples that I see appear to use an anonymous method in a call like button.setOnClickListener(). Instead, I'd like to pass in a method defined on the Activity class that I'm working in. What's the Java/Android equivalent of the following event handler wiring in C#? Button myButton = new Button(); myButton.Click += this.OnMyButton...

Compiling Hello World

I'm working from a simple "hello world" tutorial and then modify it into the app I want. I started out with a hello world app added a button and now I'm tryin to respond to button events, etc. But when I compile I'm getting the error: "package andriod.widget does not exist \n import andriod.widget.Button;" The code is package com.luk...

Testing GPS in Android

How do you test GPS applications in Android? Can we test it using the Android emulator? ...

BroadcastReceiver + SMS_RECEIVED

Hi, I'd like my app to catch incoming SMS messages. There are a few examples of this around. Looks like we just need to do this: // AndroidManifest.xml <receiver android:name=".SMSReceiver"> <intent-filter> <action android:name="android.provider.Telephony.SMS_RECEIVED" /> </intent-filter> </receiver> // SMSReceiver...

Settings management from code

Hi Everyone, I just want to ask you if you anyone knows how to change the Setting available in: Settings->Wireless Settings->Mobile Network from code or Setting: Settings->Wireless Settings->Mobile Network Settings->Network operators->Select Automatically? I had been unable to find a property that match this setting in the Settings.Sys...

Andoid startactivity and stacks keep in memory

we start activity and do not calling finish() on existing activity it keeps existing activity in stack and move to new activity if we press back button we return to previous activity. Its mean all previous activities not beeing called finish() keep remain into the memory(Stack) Now problem is i do not want to call finish for every acti...

Back to parent view when press on escape

Hi guys. I am using ViewFlipper for my application. I trying to make it : when user pressed on escape (back) button, it would be back to parent Layout. In other words, just like this : Activity | Layout1 -> Layout2 -> Layout3 if user pressed on escape, go back to parent: Layout1 <- Layout2 <- Layout3 ...