I'm porting an iOS app to Android, and I need to change the API URL depending on if it's plugged in via USB, downloaded as an .apk or installed via the Google play store.
This is so I can use my local dev API, a staging API and then obviously the public production/release API.
I've used to check if the app is running through Eclipse:
if ( ( appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE ) != 0 ) {
debug_value = "1";
}
But I need to check the difference between test/release.
In iOS I've just tested for the DEBUG
preprocessor macro, and added one for ADHOC
as well.