title: How to use a different launcher activity in a product flavor?
body: <p>I'm working on an Android library project, in the default src/main/AndroidManifest.xml, the MainActivity is the launcher activity.</p>
  
  <p>For the sake of something else, I created product flavors.  Yes, it works perfect if I want to trigger / show different activitis inside different product flavors.  However, I wanna keep the <strong>default launcher activity</strong> from <strong>src/main/</strong> folder, while register another flavored activity as the new launcher activity.  So that for different product flavors, I could have different launcher activities, and from them I could still start original "launcher" activity in src/main/.</p>
  
  <p>Could anyone kindly tell me how to achive that?  Thanks a lot.</p>
  
  <p>Notes:</p>
  
  <ol>
  <li><p>Adding <code>if (BuildConfig.FLAVOR.equals("flavorName"))</code> code to original launcher activity is not prefered.  Because I don't want to modify the production code from someone else (this is a library project).</p></li>
  <li><p>I've tried <code>manifestmerger</code> and <code>tools:replace</code>, but seems like it doesn't work for <code>intent-filter</code> (I noticed that the element merging policy for intent-filter is always).</p></li>
  </ol>
  
  <p><code>&lt;action android:name="android.intent.action.MAIN" /&gt;
  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;</code></p>
  
  <p>If this may work, could you please kindly guide me how to make it work?  Thanks.</p>