Android控制应用程序安装位置
Android应用程序的默认安装位置以及是否可移动取决于开发者在其AndroidManifest.xml中的设置:
<manifestxmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="1"
android:installLocation="auto"
android:versionName="1.0">
android:installLocation的值有三个 internalOnly ,auto,preferExternal,缺省值为internalOnly
internalOnly:该应用程序只能安装到手机内部存储中。
auto:由系统决定该应用程序安装到手机内部存储中还是SD卡中。
preferExternal:如果有SD卡就把该应用程序只能安装到SD卡中,否则安装到手机内部存储中。
当android:installLocation为internalOnly时,用户在"应用程序管理"中不能把应用程序在SD卡与内存中相互移动
android:installLocation为auto或preferExternal时,用户在"应用程序管理"中可以把应用程序在SD卡与内存中相互移动