Exit when timeout

Is the any way to exit the android native app when no action for a fixed period of time?

Technically speaking, you’re never supposed to “exit” an app. The user may have intentionally not entered data for some period of time.

If you must do something you can do a settimeout() and check if some event (key press) has occurred and if so reset the timeout and if not do something else (like change the page).

Either way, I think it would create a bad UX to assume what the user wants.