As far as I know, in android "release build" is signed APK. How to check it from code or does Eclipse has some kinda of secret defines?
I need this to debug populating ListView items from web service data (no, logcat not an option).
My thoughts:
android:debuggable
, but for some reason that doesn't look reliable. To check the debuggable flag, you can use this code:
boolean isDebuggable = ( 0 != ( getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE ) );
Kotlin:
val isDebuggable = 0 != applicationInfo.flags and ApplicationInfo.FLAG_DEBUGGABLE
For more information, please see Securing Android LVL Applications.
Alternatively, if you're using Gradle correctly, you can check if BuildConfig.DEBUG
is true or false.