Not sure if this will help in your situation, but here’s something that might work;
In your build.gradle, add product flavors:
And let the different flavors add different values for a BuildConfigField.
flavorDimensions.add("tier")
productFlavors {
create(name= "Huawei") {
dimension="tier"
buildConfigField(type="String", name="APP_FLAVOR", value="Huawei")
}
create(name= "Google") {
dimension="tier"
buildConfigField(type="String", name="APP_FLAVOR", value="Google")
}
}
Then at runtime, you could use the BuildConfig, to see which flavor is build/running; Like so:
BuildConfig.APP_FLAVOR
, which will contain a different String depending on the Flavor.