There is no way to provide intent extras when launching the activity (via the Launcher).
However, what you can do is use <activity-alias>
tags that define additional app icons that will launch the same (target) activity.
EDIT: Add example:
This example shows a real activity call MyRealActivity
and an alias called Blahblah
. Both have intent-filters that will make them appear on the list of available apps. They have different labels and different icons so that they will look like 2 different apps to the user. However, they both launch the same activity. Please note that there is no java class for .Blahblah
, that is just a placeholder and must be unique.
<activity
android:name=".MyRealActivity"
android:label="@string/header_application"
android:icon="@drawable/icon_myapp">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity-alias
android:targetActivity=".MyRealActivity"
android:name=".Blahblah"
android:label="@string/header_blahblah"
android:icon="@drawable/icon_blahblah">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity-alias>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…