First of all, apologies if this has been answered already. I've been searching for this for a couple of hours already but I wasn't able to get any answers from the web or just because I've been using the wrong keywords.
I'm currently creating an android app and I just want to know if there is a way to disable the power button when my app is running. Or in other terms, if my app is running and a person clicks on the power button, the device should not turn off or there should be a message that says "please enter passcode to exit the app" before turning off.
I'm new to android and any help is appreciated. I want to learn more if this feature exists or is possible, so if there are links that can direct me to the answer, that would suffice.
Thanks. --edit-- Just to clear things up, I'm not blocking the owner of the device to access his own device. When the app is created and activated on the device, his customers on his store can navigate through the application. I am blocking his customers from the device and not the owner of the device.