• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

auto lock application after fixed time

 
yash wardhan
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

You can use the combination of WakeLock and onUserInteraction() method to accomplish this.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic