This is my case
productFlavors {
paid {
applicationId "com.paid.app"
}
free {
applicationId "com.free.app"
}
}
and in paid
flavor I need a different launcher activity in comparison to main
or free
as done below
main/AndroidManifest.xml
<activity
android:name=".MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
paid/AndroidManifest.xml
<activity
android:name=".SecondMainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
And when I begin to install app in paid
build variants, it always install two apps i.e. free and paid but with same app name. And when I uninstall any one , both the app gets uninstalled. Shouldn't only paid
variant build a paid app and free
variant build a free app? Following is my working environment
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
}
Android Studio 1.4 beta 2
Activity
on different flavors to make two different apps. I was curious whether same can be done with two different default or launcher activity. – Pitiable