page.title=<manifest> parent.title=The AndroidManifest.xml File parent.link=manifest-intro.html @jd:body
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="string" android:sharedUserId="string" android:sharedUserLabel="string resource" android:versionCode="integer" android:versionName="string" android:installLocation=["auto" | "internalOnly" | "preferExternal"] > . . . </manifest>
<application>
<compatible-screens>
<instrumentation>
<permission>
<permission-group>
<permission-tree>
<supports-gl-texture>
<supports-screens>
<uses-configuration>
<uses-feature>
<uses-permission>
<uses-sdk>
<application>
element
and specify {@code xmlns:android} and {@code package} attributes.To avoid conflicts with other developers, you should use Internet domain ownership as the
basis for your package names (in reverse). For example, applications published by Google start with
com.google
. You should also never use the com.example
namespace when
publishing your applications.
The package name serves as a unique identifier for the application.
It's also the default name for the application process (see the
<application>
element's
process
process attribute) and the default task affinity of an activity
(see the
<activity>
element's
taskAffinity
attribute).
Caution: Once you publish your application, you cannot change the package name. The package name defines your application's identity, so if you change it, then it is considered to be a different application and users of the previous version cannot update to the new version.
This attribute was introduced in API Level 3. It is meaningful only if the
sharedUserId
attribute is also set.
The value must be set as an integer, such as "100". You can define it however you want, as long as each successive version has a higher number. For example, it could be a build number. Or you could translate a version number in "x.y" format to an integer by encoding the "x" and "y" separately in the lower and upper 16 bits. Or you could simply increase the number by one each time a new version is released.
The following keyword strings are accepted:
Value | Description |
---|---|
"{@code internalOnly}" | The application must be installed on the internal device storage only. If this is set, the application will never be installed on the external storage. If the internal storage is full, then the system will not install the application. This is also the default behavior if you do not define {@code android:installLocation}. |
"{@code auto}" | The application may be installed on the external storage, but the system will install the application on the internal storage by default. If the internal storage is full, then the system will install it on the external storage. Once installed, the user can move the application to either internal or external storage through the system settings. |
"{@code preferExternal}" | The application prefers to be installed on the external storage (SD card). There is no guarantee that the system will honor this request. The application might be installed on internal storage if the external media is unavailable or full. Once installed, the user can move the application to either internal or external storage through the system settings. |
Note: By default, your application will be installed on the internal storage and cannot be installed on the external storage unless you define this attribute to be either "{@code auto}" or "{@code preferExternal}".
When an application is installed on the external storage:
The user may also request to move an application from the internal storage to the external storage. However, the system will not allow the user to move the application to external storage if this attribute is set to {@code internalOnly}, which is the default setting.
Read App Install Location for more information about using this attribute (including how to maintain backward compatibility).
Introduced in: API Level 8.
<application>