<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>element and specify
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
process attribute) and the default task affinity of an activity
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.
versionCodeattribute holds the significant version number used internally.
The following keyword strings are accepted:
||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
||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.|
||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 "
auto" or "
When an application is installed on the external storage:
.apkfile is saved to the external storage, but any application data (such as databases) is still saved on the internal device memory.
.apkfile is saved is encrypted with a key that allows the application to operate only on the device that installed it. (A user cannot transfer the SD card to another device and use applications installed on the card.) Though, multiple SD cards can be used with the same device.
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
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.