Is there a way to check within my android application if it's being debugged, like a DEBUG flag or somthing? I want to print a special message when the application is being debugged.
You can use BuildConfig.DEBUG. This is a boolean value that will be true for a debug build, false otherwise:
if (BuildConfig.DEBUG) {
// do something with debug build
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With