0

I'm building a kiosk app and now i can make the app locked so the user can't press the recent app button, home button, and back button.

But i need to fully lock this kiosk app so user cannot interrupt the running app by shutting the device down or restart the device.

So is there any way to do so ?

I've been looking for a flutter package.

All i want is to prevent default power button behavior (usually hold to show shutdown/restart menu)

  • Do you have a root access on target devices? – Piotr Mar 16 '23 at 10:38
  • No, it's for corporate and device can't be rooted – Mahmud Jamal Mar 16 '23 at 10:47
  • 1
    Unfortunately I don't think it's possible in Flutter. Natively you could try meddling with DISABLE_KEYGUARD flags & permissions but it doesn't seem to solve the problem completely. From what I've gathered only way to prevent physical button action is to access core Android behavior files with root access. Here are some useful links for you: https://stackoverflow.com/questions/10817367/disable-screen-lockpower-button-in-android https://developer.android.com/reference/kotlin/android/app/KeyguardManager https://forum.xda-developers.com/t/how-to-disable-the-keyguard-with-tasker.3860115/ – Piotr Mar 16 '23 at 12:00
  • @Piotr Thanks for the references. – Mahmud Jamal Mar 16 '23 at 12:14
  • Please provide enough code so others can better understand or reproduce the problem. – Community Mar 16 '23 at 14:52

0 Answers0