However if your application links to additional packages register them within

However if your application links to additional

This preview shows page 21 - 29 out of 47 pages.

However, if your application links to additional packages, register them within the <application> tag using <uses-library> .
Image of page 21

Subscribe to view the full document.

Working with External Libraries (Cont’d) <uses-library android:name="com.sharedlibrary.sharedStuff" />
Image of page 22
Other Application Configuration Settings and Filters <supports-gl-texture> This tag is used to specify the GL texture compression format supported. It is used by applications that use the graphics libraries and are intended to be compatible only with devices that support a specific compression format. <compatible-screens> This tag is used solely by the Google Play store to restrict installation of your application to devices with specific screen sizes. It is not checked by Android and usage is discouraged unless you absolutely need to restrict the installation to certain devices.
Image of page 23

Subscribe to view the full document.

Registering Activities in the Android Manifest Each Activity within the application must be defined with an <activity> tag. The following XML excerpt registers an Activity class called SensorsActivity : <activity android:name =“ SensorsActivity" /> This Activity must be defined as a class within the application package, in this case: com.introtoandroid.simplehardware
Image of page 24
Designating an Entry Point Activity Using an Intent Filter You can designate an Activity class as the primary entry point. Just configure an intent filter, such as <intent- filter> , with the following options: MAIN action type The LAUNCHER category
Image of page 25

Subscribe to view the full document.

Designating an Entry Point Activity Using an Intent Filter (Cont’d) <activity android:name=".SimpleHardwareActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> For example, this XML configures an Activity called SimpleHardwareActivity as the primary launching point of the application.
Image of page 26