How to create dynamic URLs using Build Flavors in Android (Android Studio)
I have more than 15 URLs for each environment in my app, and in total we have 5 environments, how do I use these URLs from a common class, based on the Activated build variant.
Question posted in Android Studio
The official documentation can be found here.
The official documentation can be found here.
2
Answers
Create an option in you app for switching environments.
Hope these steps might help you.
Steps ->
Inside your manifest for each activity that will handle the dynamic link add a specific intent-filter.
where the pathPrefix comes from a flavor specific resource string.
The dynamic link has common scheme and host but a specific path section for each flavor, so the link will be opened only by the specific flavored app.