File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
Jboss-CMP Caching
File Access from a Directory.
Alerting the user about Session expiry after idle-time
How to find the Browser Idle time?
User Idle Time?