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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With