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

613 views
Skip to first unread message

Suman

unread,
Dec 3, 2012, 7:04:25 AM12/3/12
to andro...@googlegroups.com
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

David Turner

unread,
Dec 4, 2012, 6:40:35 AM12/4/12
to andro...@googlegroups.com
On Mon, Dec 3, 2012 at 1:04 PM, Suman <aluval...@gmail.com> 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 andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.

Reply all
Reply to author
Forward
0 new messages