I have multiple applications but it is one application with many flavors for many domains.
For every app I have separate package with AppConfig file and res folder which contains images for every domain.
Paths: app/src/eu/java/in/AppConfig; app/src/com/java/in/AppConfig; app/src/fr/java/in/AppConfig and etc.
And separate productFlavors for every build. I'm making for every domain separate apk.
But now I need to make one app and app itself must on run time change configs and resources then user change it.
For example menu where user choose domain and app must take for all application correct configs.
How I can achieve this solution? How can i build one opp which change on runtime its resources and configurations.
//config example
object AppConfig {
const val oauthToken = "url"
const val oauthClientID = "id"
....
}
//build.gradle example
productFlavors {
dev {
applicationId "dev.in.app"
dimension "default"
}
eu {
applicationId "eu.in.app"
dimension "default"
}
....
}