码迷,mamicode.com
首页 > 移动开发 > 详细

【移动开发】android:installLocation

时间:2014-12-09 15:33:06      阅读:183      评论:0      收藏:0      [点我收藏+]

标签:des   android   http   io   ar   for   strong   on   ad   

android:installLocation
The default install location for the application.

The following keyword strings are accepted:

ValueDescription
"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 android:installLocation.
"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.
"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 "auto" or "preferExternal".

When an application is installed on the external storage:

  • The .apk file is saved to the external storage, but any application data (such as databases) is still saved on the internal device memory.
  • The container in which the .apk file 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.
  • At the user‘s request, the application can be moved to the internal 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 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.

【移动开发】android:installLocation

标签:des   android   http   io   ar   for   strong   on   ad   

原文地址:http://www.cnblogs.com/paranoia/p/4153227.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!