The <activity> element can also use the <intent-filter> element to specify various intent filters to declare how other application components can activate them.
When you use the androidsdk tool to create a new application, the automatically created activity contains an intent filter that declares that the activity responds to the "Main" action, and the filter is placed in the "launcher" category. The filter statement is as follows:
<Activity Android: Name = ". exampleactivity" Android: icon = "@ drawable/app_icon">
<Intent-filter>
<Action Android: Name = "android. Intent. Action. Main"/>
<Category Android: Name = "android. Intent. Category. launcher"/>
</Intent-filter>
</Activity>
<Action> the element specifies that this is the main entry of the application. <Category> the element specifies that the activity should be listed in the Application Loader of the system (allowing users to load the activity)
If you want your application to be self-contained and do not allow other applications to activate its activity, no other intent filter is required, you only need to configure the "Main" action and "launcher" category for the activity as shown in the preceding example. Activities that do not want to be valid for other applications should not have intent filters, and you can start them in your own applications.
However, if you want your activity to respond to implicit intent from other applications (including the application itself), you must define an additional intent filter for your activity. For each intent type that you want to respond to, you must include an <action> element in the <intent-filter> element and optional <Category> and <DATA> elements. These elements specify the intent type that your activity can respond.
For more information about the intent that the activity can respond to, see the intents and intent filters documents.