I have tried developer mode and USB debugging is enabled or not,
using the below code changes. it's working fine.
private fun check_My_Android_Mobile_Developer_Mode_Status() {
// solution 1
val adb: Int = Settings.Secure.getInt(this.contentResolver,
Settings.Global.ADB_ENABLED, 0)
Toast.makeText(this,"USB Debugging Detect: adb mode:"+adb, Toast.LENGTH_LONG).show()
// solution 2
if(Settings.Secure.getInt(this.getContentResolver(), Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0) == 1) {
// Developer Mode enabled
Toast.makeText(this,"Developer Mode enabled: Show Alert", Toast.LENGTH_LONG).show()
} else {
//Developer Mode does not enabled
Toast.makeText(this,"Developer does not enabled: Running Safe Mode", Toast.LENGTH_LONG).show()
}
}
But, I want to check wireless debug mode is enabled or not alone(from developer mode On status). I unable to find any solution.
can anyone help on this. Thanks Advance. Referred links below: