Thursday, July 22, 2010

Android Applications Tutorial 18. Manifest

Android Applications Tutorial
18. Manifest


18.1 AndroidManifest.xml File
18.2 Structure of the AndroidManifest.xml File
18.3 File Conventions
18.4 File Features



18.1 AndroidManifest.xml File
The foundation for any Android application is the manifest file. Every application must have an AndroidManifest.xml file in its root directory. The manifest presents essential information about the application to the Android system, information the system must have before it can run any of the application's code. Among other things, the manifest does the following:

It names the Java package for the application. The package name serves as a unique identifier for the application.
It describes the components of the application � the activities, services, broadcast receivers, and content providers that the application is composed of. It names the classes that implement each of the components and publishes their capabilities (for example, which Intent messages they can handle). These declarations let the Android system know what the components are and under what conditions they can be launched.
It determines which processes will host application components.
It declares which permissions the application must have in order to access protected parts of the API and interact with other applications.
It also declares the permissions that others are required to have in order to interact with the application's components.
It lists the Instrumentation classes that provide profiling and other information as the application is running. These declarations are present in the manifest only while the application is being developed and tested; they're removed before the application is published.
It declares the minimum level of the Android API that the application requires.
It lists the libraries that the application must be linked against.



18.2 Structure of the AndroidManifest.xml File
The diagram below shows the general structure of the manifest file and every element that it can contain. Each element, along with all of its attributes, is documented in full in a separate file.

























. . .




. . .




. . .













All the elements that can appear in the manifest file are listed below in alphabetical order. These are the only legal elements; you cannot add your own elements or attributes.



























25. Activity Life Cycle
24. Media
23. HTTP Internet Connection
22. Threads
21. Content Provider
20. Notification and Service
19. Animation - Frame By Frame, Layout, and View
18. Manifest
17. Map View
16. Preferences
15. Configuring Rotation
14. On Notepad Examples
13. Intent
12. Activity Testing
11. Android JUnit Test
10. Menus
9. TabWidget, Flipper, and SlidingDrawer
8. DatePicker, TimePicker, and Clocks
7. Advanced ListView Widget
6. ListView, Spinner
5. Layouts
4. User Interface
3. Back to Hello World Again
2. Hello World
1. Introduction


No comments:

Post a Comment