Class InactivityTimer


  • public final class InactivityTimer
    extends Object
    Finishes an context after a period of inactivity if the device is on battery power.
    • Constructor Detail

      • InactivityTimer

        public InactivityTimer​(Context context,
                               Runnable callback)
    • Method Detail

      • activity

        public void activity()
        Trigger activity, resetting the timer.
      • start

        public void start()
        Start the activity timer.
      • cancel

        public void cancel()
        Cancel the activity timer.