How can I detect if a user is in debugging mode

Viewed 20

Is there any way to detect if a mobile session on my android app is in android USB debugging mode or developer mode, or otherwise running automation via tools such as appium

1 Answers

The simplest way:

 if (BuildConfig.DEBUG) {
       return "debug";
 }else {
       return "not debug";
 }

Depending on what your are doing there may be a better way, just Google Buildconfig.Degug

Related