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
Pergunta
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?
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow