I am working on a drone app where I need to land the drone when the phone screen in locked. I have tried KeyguardManager but its deprecated. Are there any other functions or methods which I can use?
compileSdkVersion 29
buildToolsVersion "29.0.2"
minSdkVersion 15
targetSdkVersion 29
I have already included onPause
method in my code
@Override
protected void onPause() {
// Code to land
super.onPause();
}