Skip to content Skip to sidebar Skip to footer

Android: Release And Testing Mode?

I'm working on android project and I want to set some variable on running time, how to do it ? to be more specific I want to have two running configuration: pre production config

Solution 1:

You can define both URLs in your code and decide which one to use depending on BuildConfig.DEBUG.

Alternatively, if you don't want to define them in your code you can use a property (setprop prop value) and then retrieve it in your app (getprop prop).

If you are using the emulator there's even a -prop option

-prop <name>=<value>           set system propertyon boot

Post a Comment for "Android: Release And Testing Mode?"