Use PackageManager
to get an ApplicationInfo
object on your application, and check the flags
field for FLAG_DEBUGGABLE
.
boolean isDebuggable = (0 != (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE));
More Related Contents:
- Android studio 3.5 refactor issue
- Android intent filter: associate app with file extension
- “Protected Apps” setting on Huawei phones, and how to handle it
- How can I disable landscape mode in Android?
- How to add manifest permission to an application?
- List of Android permissions normal permissions and dangerous permissions in API 23? [duplicate]
- How to set different label for launcher rather than activity title?
- How to fix “unexpected element found in ” error?
- Setting drawable folder to use for different resolutions
- How to autoincrement versionCode in Android Gradle
- Naming my application in android
- Android Studio 3.0 Manifest Error: unknown element found
- How to show one layout on top of the other programmatically in my case?
- Error type 3: Activity Class {…} does not exist
- WRITE_SECURE_SETTINGS permission error even when added in Manifest
- What’s the “dot” for when registering an Activity
- Is it possible to define a broadcast receiver as an inner class in manifest file? [duplicate]
- Can not set debuggable flag in AndroidManifest.xml
- Usage of android:process
- Start android application without activity
- How can I fix “unexpected element found in ” error?
- customize check box preference
- Android – Adding at least one Activity with an ACTION-VIEW intent-filter after Updating SDK version 23
- What is metadata ? And what is the use of it in android
- About the Full Screen And No Titlebar from manifest
- Android READ PHONE STATE?
- How can you get the Manifest Version number from the App’s (Layout) XML variables?
- Possible to use multiple authorities with FileProvider?
- How to add network_security_config.xml to manifest in expo app without ejecting
- How to use the new Android M feature of “Text Selection” to be offered from outside of your app?