Refer to the documentation on IntentFilters:
To pass this test, the action specified in the Intent object must match one of the actions listed in the filter. If the object or the filter does not specify an action, the results are as follows:
If the filter fails to list any actions, there is nothing for an intent to match, so all intents fail the test. No intents can get through the filter.
On the other hand, an Intent object that doesn't specify an action automatically passes the test — as long as the filter contains at least one action.
In my code,
Intent intent = new Intent();
startActivity(intent);
<activity
android:name=".MainActivity2"
android:label="@string/title_activity_main_activity2" >
<intent-filter>
<action android:name="fdsfds.hihi" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Why my intent cannot launch .MainActivity2 ?