Two activities are installed having the following manifest files on device respectively:
The First app's activity has in its manifest:- where, package="com.example.tictactoe"
<intent-filter> <action android:name="com.example.tictactoe.YOYO" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="text/*" /> </intent-filter> The second app's activity has in its manifest:- where,
package="com.example.project"
<intent-filter> <action android:name="com.example.project.YOYO" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="text/*" /> </intent-filter> Now, i want to start one of these activity from third application using the following code:
i=new Intent(); i.setAction("YOYO"); i.putExtra("KEY","HII..i am from third app"); startActivity(i); But execution shows an error:-
03-11 08:12:30.496: E/AndroidRuntime(1744): FATAL EXCEPTION: main 03-11 08:12:30.496: E/AndroidRuntime(1744): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=ACTION_SEND (has extras) }
actionfor theIntentisn't enough - you must use the exact name you specify in the<intent-filter>.