Closing the app on exit would either turn the screen off (losing the
whole point of FLAG_KEEP_SCREEN_ON) or leave it static and unattended
(reintroducing burn-in risk). Instead, stay in kiosk mode and show a
message + Exit button at a random position, re-randomized every
minute, so a device left unsupervised in this state stays safe.
Confirmed on the real device: process exit is detected and logged,
the button repositions after a minute, and tapping it closes the app.
Plain startActivity() from BootReceiver (and even from a foreground
service) gets blocked as a background activity start and the process
gets reclaimed before becoming visible. Switch to a full-screen-intent
notification (the mechanism alarm/call apps use), which needs
USE_FULL_SCREEN_INTENT + POST_NOTIFICATIONS granted, plus
setShowWhenLocked/setTurnScreenOn on MainActivity so it displays over
the lock screen. Confirmed working on an untouched real-device reboot.
Kiosk boot-starter for slocker-lite: auto-launches on boot, shows a
skippable countdown, then takes over the screen (fullscreen, black,
screen kept on) while running a user-configured command in the
background.