有关AndroidManifest.xml文件的application分支我们有必要了解一些常见的属性,这里可以看到一些我们实用的选项,比如允许调试android:debuggable、任务关系android:taskAffinity,比如我们常见的方式创建一个新的任务实用标记FLAG_ACTIVITY_NEW_TASK,为程序制定一个主题,可以使用android:theme指向一个主题文件。
平时我们创建的程序使用一些安全敏感项,会需要请求系统许可权限,这里可以使用android:permission来制定相关的许可,每个程序的service、activity、content provider、receiver都需要在application的节点内实现。有关完整的属性可以查看:
1 <application android:allowClearUserData=["true" | "false"]
2 android:allowTaskReparenting=["true" | "false"]
3 android:debuggable=["true" | "false"]
4 android:description="string resource"
5 android:enabled=["true" | "false"]
6 android:hasCode=["true" | "false"]
7 android:icon="drawable resource"
8 android:label="string resource"
9 android:manageSpaceActivity="string"
10 android:name="string"
11 android:permission="string"
12 android:persistent=["true" | "false"]
13 android:process="string"
14 android:taskAffinity="string"
15 android:theme="resource or theme" >
16 . . .
17 </application>
18
19
2 android:allowTaskReparenting=["true" | "false"]
3 android:debuggable=["true" | "false"]
4 android:description="string resource"
5 android:enabled=["true" | "false"]
6 android:hasCode=["true" | "false"]
7 android:icon="drawable resource"
8 android:label="string resource"
9 android:manageSpaceActivity="string"
10 android:name="string"
11 android:permission="string"
12 android:persistent=["true" | "false"]
13 android:process="string"
14 android:taskAffinity="string"
15 android:theme="resource or theme" >
16 . . .
17 </application>
18
19