aspose file tools*
The moose likes Android and the fly likes auto lock application after fixed time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "auto lock application after fixed time" Watch "auto lock application after fixed time" New topic
Author

auto lock application after fixed time

yash wardhan
Ranch Hand

Joined: Jan 22, 2008
Posts: 46
Hi,

I want to know if there is a way to get the notification for inactivity timer.
My scenario is as given here

If user remains idle for 1 min. then I should get the notification so that I can exit the application.
How does the emulator/device gets the notification of idleness and the back light goes dim?

Can someone please guide me how to implement it or point to a sample application.

Thanks in advance
Anirudh Aithal
Greenhorn

Joined: Jun 09, 2009
Posts: 7
Hi,

You can use the combination of WakeLock and onUserInteraction() method to accomplish this.

Regards,
Anirudh
 
jQuery in Action, 2nd edition
 
subject: auto lock application after fixed time