android

Android 1.5 Programming with TabHost and Buttons?

Hello All, I am currently trying out the android sdk 1.5 and i have seen a couple of examples on TabHost what i am trying to do is to use a different button on each Tab to do its tasks. What i tried was using onClickListiner() and onClick() i think this is what all the developers use but i keep getting a null exception on the log cat, ...

Stretching ListView to a single screen?

A simple ListView with, say, 6 rows (Views). Now, I want it to fit exactly a single screen. Any straightforward way to do this? Or should I go with a custom view? ...

Android: Keyboard event handler

Hi, I created a full-screen application and set the default orientation to landscape. When I open the keyboard the application crashes therefore I would like to override the method which executes on keyboard slide. Does anyone know which method is that? Thanks! ...

Android: How to release resources when the application terminates?

Hi, I created an application which uses camera and during the appplication execution the screen is always on. In the onCreate() method I added the lock: final PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); this.mWakeLock = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "My Tag"); this.mWakeLock.acquire();...

How can i run APIDemos on Android emulator?

I would like to run APIDemos under platforms\android-1.5\samples directory on Android emulator but i don't know how to do it. Do i need to generate an apk or import sources as an ecplipse project? Thanks ...

Android: How to pass the data to sub-activities?

Hi, The main activity includes some variables with set values. I created a sub-activity with the form which has to be filled with the data from main activity so I guess the data have to be passed to the sub-activity when it starts. Does anyone know how to pass the variable values to the sub-activity from the main activity? Thanks! ...

Android: How to restart video preview after the surfaceDestroyed()?

Hi, I have created a CapturePreview class and CameraManager class the following way: CapturePreview: public class CaptureView extends SurfaceView implements Callback{ private final SurfaceHolder surfaceHolder; FileReaderWriter fileRW; int frameCount; private static final int MSG_FRAME_REFRESHED = 1; private static final int MSG_AUTO...

Android: Camera is not available problem

Hi, I am trying to capture video and the routine throws an exception when the execution reaches recorder.prepare() statement: private void recordVideoStart(){ if(recorder != null) { recorder.stop(); recorder.release(); } File file = new File("/sdcard/videoTest.3gpp"); try { file.createNewFile(); } catch (IOException e) { ...

Android: Grabbing Voice

Are there APIs for grabbing the voice (in both directions) during a call? I'm interested in whether it can be intercepted before it's sent out (outgoing) and before it's played by the speaker (incoming). ...

Programming on (not *for*) an Android device

Are there any interpreters available for the Android platform for any language at all? If so, do they work with both physical and on-screen keyboards? ...

Can The Android drawable directory contain subdirectories?

In the Android SDK documentation, all of the examples used with the @drawable/my_image xml syntax directly address images that are stored in the res/drawable directory in my project. I am wondering if it is explicitly not okay to create a sub directory within the drawable directory. For example, if I had the following directory layout:...

Is Android development restrictive in any way like for the iPhone?

Is Android development restrictive in any way like the iPhone, or can you download whatever and from whoever you want? I want to learn about development for either iPhone or Android, but from what I hear iPhone development is pretty restrictive! ...

How to do Client server communication in Android?

I want to send and receive information between Emulators in Android.i am using two systems and i have installed android in both the systems and i have to consider one emulator as server and another as client.Now i want to send data from one to another.Anyone knows regrading this please help me with some sample code. ...

Multiple Toggle Buttons.

Hi! I am developing an application on Android's platform to play a sound when I toggle a button. I am able to get the application working properly when I have one toggle button. However, when I have multiple toggle buttons, all of them just play the first sound from the first toggle button. How do I go about to solve it? I have all the...

showing dialog from run method

hi, I am trying to pop up dialog from run method it gives me exception that Looper.prepare not called ,when i call the same method i dont get any exception but there is no pop up dialog shown on the console .As i have used handler in this way , handler = new Handler() { public void handleMessage(Message msg) { ...

Android Endless List

How can I create a list where when you reach the end of the list I am notified so I can load more items? Thanks, Isaac ...

android phonegap application fails when loading too much javascript

I have an application that is based on Web 2.0 technologies -- basically I use phonegap / titanium approach to start up a web browser where most of the app is written in javascript and HTML (jQuery, to more precise). The app works great on the emulator, but when I launch it on the G1, it crashes. When I reduce the amount of javascript ...

Android AlarmManager

Can someone please show me some sample code on how to use an AlarmManager in android. I have been playing around with some code for a few days and it just won't work... I need to trigger a block of code after 20 minutes from the AlarmManager being set. Thanks. ...

How can I catch SIGSEGV (segmentation fault) and get a stack trace under JNI on Android?

I'm moving a project to the new Android Native Development Kit (i.e. JNI) and I'd like to catch SIGSEGV, should it occur (possibly also SIGILL, SIGABRT, SIGFPE) in order to present a nice crash reporting dialog, instead of (or before) what currently happens: the immediate unceremonious death of the process and possibly some attempt by th...

How to block calls in android

I want to block calls from few numbers, for that I want to write a app of my own. So what are the APIs which I should be using? Basically I want to get notified when a call comes, i want to compare numbers if it is what i want to block, i want to cut the call or mute it or if possible mute it and record it. ...