Flutter device administrator permission

1,478

There is currently no platform-agnostic Flutter implementation for locking a device screen programmatically. The Android specific page you were looking at is what you need to add admin permissions to the manifest file and implement your screen locking functionality.

You can add Android-specific Java or Kotlin code in a Flutter project as stated here: https://flutter.io/docs/development/platform-integration/platform-channels

Share:
1,478
Admin
Author by

Admin

Updated on December 07, 2022

Comments

  • Admin
    Admin over 1 year

    I'm trying to build an application that will lock the screen on a timer in Flutter. I'm wondering how to grant android device administrator permissions to an application in flutter. I've found this but it's not really helpful i feel for flutter.

    https://developer.android.com/guide/topics/admin/device-admin#java

    Does anyone have any suggestions?

  • ThinkDigital
    ThinkDigital almost 5 years
    Makes sense, since I KNOW Apple wouldn't expose control like that as an API. @Diar, how is this going? I'm interested in Unlocking the device on call.