For API 3-16
int debugMode = Settings.Secure.getInt(context.getContentResolver(), Settings.Secure.ADB_ENABLED, 0);
if(debugMode==1){
//debug mode active
}
if(debugMode==0){
//debug mode NOT active
}
For API 17+
int debugMode = Settings.Secure.getInt(context.getContentResolver(),
Settings.Global.ADB_ENABLED
, 0);
if(debugMode==1){
//debug mode active
}
if(debugMode==0){
//debug mode NOT active
}
No comments:
Post a Comment