my dog learned polymorphism*
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "auto lock application after fixed time" Watch "auto lock application after fixed time" New topic

auto lock application after fixed time

yash wardhan
Ranch Hand

Joined: Jan 22, 2008
Posts: 46

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

Joined: Jun 09, 2009
Posts: 7

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

I agree. Here's the link:
subject: auto lock application after fixed time
Similar Threads
User Idle Time?
How to find the Browser Idle time?
Alerting the user about Session expiry after idle-time
Jboss-CMP Caching
File Access from a Directory.