I’m building an app that’s only for my device, so I don’t have worries about going into the play store or app store review or anything.
I want to be able to “lock” my phone (basically emulating a tap of the power button), from what I saw I can actually do this by registering as a device administrator and invoking https://developer.android.com/reference/android/app/admin/DeviceAdminInfo#USES_POLICY_FORCE_LOCK
This works! Except that I have to type in my password instead of being able to get in via biometric (my fingerprint).
Is there some other device admin control I can use to just lock my screen or is my best route trying to do this via accessibility services instead?