Android Native timer for bringing back the device to wake up mode?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Android Native timer for bringing back the device to wake up mode?

Suman
I want to launch a timer which will get fired when the timer gets expired when the device is in low power (sleep) mode.

Device only gets waked up (normal mode) either on hard ware event (pressing of power button) or any network activity (call or data packet receiving).

Is there any way to bring the device back to the normal mode with timers in the native layer of android?

I googled so much but not able to find a way. Tried using timer_create() as well. But its not getting fired when the device is in low power (sleep) mode.

Please let me know if anyone had already done on this part.

Actually precision required for me is in milliseconds and the AlarmManager with RTC_WAKEUP is in the application layer which is expiring after consider delay and also this is in the Java layer. (If I implement Jni it will make some overhead to the application as there are multiple timers which need to be run in sleep mode).

Regards,
Suman

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/LJ7H-kdxd9YJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Android Native timer for bringing back the device to wake up mode?

David Turner


On Mon, Dec 3, 2012 at 1:04 PM, Suman <[hidden email]> wrote:
I want to launch a timer which will get fired when the timer gets expired when the device is in low power (sleep) mode.

Device only gets waked up (normal mode) either on hard ware event (pressing of power button) or any network activity (call or data packet receiving).

Is there any way to bring the device back to the normal mode with timers in the native layer of android?

Now, you need to use the AlarmManager through JNI to do that.
 
I googled so much but not able to find a way. Tried using timer_create() as well. But its not getting fired when the device is in low power (sleep) mode.

Please let me know if anyone had already done on this part.

Actually precision required for me is in milliseconds and the AlarmManager with RTC_WAKEUP is in the application layer which is expiring after consider delay and also this is in the Java layer. (If I implement Jni it will make some overhead to the application as there are multiple timers which need to be run in sleep mode).

Millisecond precision doesn't seem to be compatible with any low power mode, and for good reasons. Device wake up always take time. Why would you want something that accurate in sleep mode?
 
Regards,
Suman

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/LJ7H-kdxd9YJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.