Install two versions of the same app on one device
2 answers
The best way to achieve this is using gradle.
You can define 2 flavors , something like:
productFlavors {
flavor1 {
applicationId "com.example.flavor1"
}
flavor2 {
applicationId "com.example.flavor2"
}
}
Note to do this with manifest as gradle overrides this file.
You can also define a suffix.
Something like that:
android {
defaultConfig {
applicationId "com.example.myapp"
}
productFlavors {
flavor1 {
applicationIdSuffix ".flavor1"
}
flavor2 {
applicationIdSuffix ".flavor2"
}
}
}
+2
source to share