Androidmanifest.xml
Essence: Is the master configuration manifest file for the entire application
Include: The app's package name, version number, components, permissions, and other information
Role: Record the relevant configuration information for the application
First, the common label
(1), global article (package name, version information)
(2), component chapter (four components),
(3), permission chapter (Request permission and define permission)
1. Global article
(1), the application of the package name and version information management
Package= "Com.example.tset"
Android:versioncode= "1"
Android:versionname= "1.0" >
(2), control the Android version of the information (can support the minimum version, you expect the system version)
Android:minsdkversion= "8"
android:targetsdkversion= "16"
2. Component Chapter
<application android:icon= "@drawable/icon"
Android:theme= "@style/my_theme" >
</application>
Its properties can be set:
(1), Icon: Android:icon
(2), title: Android;label
(3), theme style: Android:theme
Registering components in a configuration file
(1), define activity
<activity
Android:name= "Com.example.allcode.MainActivity"
Android:label= "@string/app_name"
Android:theme= "@android: Style/theme.dialog"
>
<intent-filter>
<action android:name= "Android.intent.action.MAIN"/>//as the main activity
<category android:name= "Android.intent.category.LAUNCHER"/>//displayed in the software list
</intent-filter>
</activity>
Note: Starting an activity that is not defined in the manifest throws an exception
(2), define Service (services)
<sevice android:name= "Com.ttg.service.CouponService"
<intent-filter>
<action android:name= "Com.ttg.service" </action>
</intent-filter>
</seivice>
(3), content Provider (contents provider)
<provider android:name= "Com.example.manifest.provider" >
</provider>
Content providers are used to manage database access and in-Program and inter-program sharing
(4), broadcast receiver (broadcast receiver)
<receiver android:name= "Com.ttg.receiver.CouponService"
<intent-filter>
<action android:name= "Com.ttg.install" </action>
</intent-filter>
</receiver>
Android Development _ talking about master configuration file (Androidmanifest.xml)