Skip to content

Instantly share code, notes, and snippets.

@akingdom
Last active March 14, 2025 06:34
Show Gist options
  • Save akingdom/9b5c55a38dbdd910acd24d3e7927a180 to your computer and use it in GitHub Desktop.
Save akingdom/9b5c55a38dbdd910acd24d3e7927a180 to your computer and use it in GitHub Desktop.
check if the Android app is a debug build versus a release build
// Android Java
// How to check if the app is a debug build versus a release build.
//
// By Andrew Kingdom
// MIT license
//
public class MainActivity extends AppCompatActivity {
// Returns true if the app is debuggable
public boolean isDebuggable() {return ((this.getApplicationInfo().flags) & android.content.pm.ApplicationInfo.FLAG_DEBUGGABLE) != 0;}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment