Designating the Launch Activity

You can use an Intent filter to designate an activity as the primary entry point of the application. The Intent filter for launching an activity by default must be configured using an <intent-filter> tag with the MAIN action type and the LAUNCHER category. In the Droid1 project, the Android project wizard set DroidActivity as the primary launching point of the application:

<activity android:name=".DroidActivity' android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>

This <intent-filter> tag instructs the Android system to direct all application launch requests to the DroidActivity activity.

0 0

Post a comment