Device Idle State Capture

by Pooja » Tue, 03 Feb 2009 14:14:00 GMT

Sponsored Links
 Hi All:

Is it possible to somehow detect and capture the idle state of the
android device?
Need help on the approach which should be followed for developing idle
time based applications in android?


Device Idle State Capture

by Dianne Hackborn » Tue, 03 Feb 2009 14:26:50 GMT

 Well first you need to define what you mean by "idle".

Dianne Hackborn
Android framework engineer

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.


Sponsored Links

Device Idle State Capture

by Pooja » Tue, 03 Feb 2009 15:36:28 GMT

 I meant when the device goes to PARTIAL_WAKE_LOCK state.



Other Threads

1. Mediaplayer and stopping it....

I have a activity which is called from another activity as an
intent... This activity loads and starts playing a audio file. All is
good - that much works. The activity also has a "stop" button and that
stops the audio from playing - that is also fine.

But how do I stop the file from playing if the user uses the back
button to leave the activity without clicking on the "Stop" button?


2. How can I check if GPS is supported in code?

Hi folks,

Im trying to write a piece of code which checks if GPS is supported by
the device.

                locationProvider = locManager.getProvider("gps");

                if (locationProvider != null) {
                        if (locManager.isProviderEnabled("gps")) {
                                Log.d(TAG , TAG + "GPS supported, enabled");
                                        return true;
                                Log.d(TAG, TAG + "GPS supported, disabled");
                                return false;
                Log.d(TAG, TAG + "GPS not supported");
                return false;

I've tried creating an AVD with no GPS support to test the code above
but the emulator is buggy: "process system is not responding"... Alot
of error when starting it up: "Unable to read framework command" and
so on...
I don't have any device without GPS support available...

Can you guys see anything wrong with my code? Or maybe u know a better
way to do the GPS support check?


3. Could this happen on Android?

4. Android keyevent keycodes and scancodes

5. OnScrollListener#onScrollStateChanged cange behavior from 1.5?

6. Is status bar an activity?

7. Android on Samsung s3c6410 accessing rs232 serial port