Search code examples
androidlockscreenandroid-things

Lockscreen in Android Things


I need to show a lockscreen after 15 seconds of user inactivity. In my project I use ViewPager with three pages.

How can I check for inactive user action in all the three pages and all the elements on this pages?


Solution

  • You could use a timer that shows a lockscreen after 15 secs of inactivity and zero its timing in the Activity's onUserInteraction() method.