Your <intent-filter>
isn't correct. You have this:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="com.example.app1.START_APP2" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
You need this:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="com.example.app1.START_APP2" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
The first filter is so that your app will show up in the list of available applications. The second filter is for use by the other application. When an application calls startActivity()
and there is no explicit component specified in the Intent
, Android automatically adds the DEFAULT category to the Intent
. Since you haven't got the DEFAULT category in your <intent-filter>
, it does not match and Android cannot find a suitable activity to start.