Android - How to check if Developer option is enabled

trullallero picture trullallero · Jul 23, 2015 · Viewed 12.4k times · Source

How can I check if the user has developer option enabled on its device? (not with adb comunication active, or debug USB active, I need to know only if Developer Option are enabled).

I've tried this solution: How to check programmatically whether app is running in debug mode or not? but it doesn't work for me. Thanks in advance

Answer

Joel Geiser picture Joel Geiser · Jul 23, 2015

try this:

int adb = Settings.Secure.getInt(this.getContentResolver(),
                Settings.Global.DEVELOPMENT_SETTINGS_ENABLED , 0);