One application installed, displays two entries in the launcher

In Android, how to implement the following effect?

Install only one application, but there are two entries in the launchpad, and each of them will go to a different ui.

Just like a google map, you can see only one application, but there are maps and navigation records.

Thanks.

+7
android android-intent launcher
source share
1 answer

You need to add a category as android.intent.category.LAUNCHER for both actions in AndroidManifest.xml

Example:

  <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".MyActivity1" android:label="@string/app_name"> <intent-filter> .... <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".MyActivity2" android:label="@string/app_name"> <intent-filter> .... <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> 
+11
source share

All Articles