As I needed to lock the device, I ended up by using Device Administration API that allows to lock the device with a password.
Undismissable Android dialog
Question
I need an undismissable Android dialog or a view that can't be canceled. This solution works unless I hold the Home button and switch to another application.
Is it possible to keep a dialog or a view above everything unless the application providing the dialog is killed or the device is restarted/switched off?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow