android – Configuring different build types to use different environment values-ThrowExceptions

Exception or error:

Well this question might not be directly related to any code issues but would like to know what is the general way in which we can have different environment configs for different build types.

In my case, I am looking for three different build types: DEBUG, STAGING, RELEASE where each build type should use different API_BASE_URL and some other keys. I have seen few react-native modules out there such as react-native-config but they seem to be unmaintained as there is a long list of issues unresolved.

App center is also another choice but comes with limitations in the free tier and the paid plan is out of my reach.

So, I would like to know what approaches do app developers usually take to achieve what I am looking for, keeping in mind the 12 factors and also how do I set the build types?

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *