D
Deleted User
Guest
I wrote a simple app that has two activities and a launcher for each activity, following the video
. After installing on my phone with Android Studio (Run / Debug 'app'), both launchers show up in my app list, the main launcher correctly brings up the first activity, but the second launcher also brings up the first activity. What am I missing, here, to get the second launcher to launch the second activity of my app? Here is my AndroidManifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.systemsolutionsrd.btlos">
<application
android:allowBackup="true"
android:icon="@Mipmap/ic_launcher_main"
android:label="@String/app_name"
android:roundIcon="@Mipmap/ic_launcher_main_round"
android:supportsRtl="true"
android:theme="@Style/Theme.BtLos">
<activity
android:icon="@Mipmap/ic_launcher_main2"
android:label="@String/main2_label"
android:name=".MainActivity2"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:icon="@Mipmap/ic_launcher_main"
android:label="@String/main_label"
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.systemsolutionsrd.btlos">
<application
android:allowBackup="true"
android:icon="@Mipmap/ic_launcher_main"
android:label="@String/app_name"
android:roundIcon="@Mipmap/ic_launcher_main_round"
android:supportsRtl="true"
android:theme="@Style/Theme.BtLos">
<activity
android:icon="@Mipmap/ic_launcher_main2"
android:label="@String/main2_label"
android:name=".MainActivity2"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:icon="@Mipmap/ic_launcher_main"
android:label="@String/main_label"
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>