Is it possible to replace the activity that gets the intent-filter
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
by configuring flavors?
There are a number of ways to accomplish this thanks to the manifest merger.
The easiest way is to use a placeholder in your manifest and define the appropriate class in your build.gradle.
For example, in your manifest:
<activity android:name="${launchActivityName}">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
And in your build.gradle:
productFlavors {
flavor1 {
manifestPlaceholders = [ launchActivityName:"com.example.MainActivity"]
}
}
You can also include a different manifest file with each flavor.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With