在android2.2 版本和以後的版本中,android應用可以自定義選擇安裝的路徑
AndroidManifest.xml
下面的
manifest節點中有個屬性叫:android:installLocation 可以決定程序安裝的路徑
屬性的值有:
auto --------自動,有系統決定安裝位置
internalOnly ---- 手機內存
preferExternal ----------外部存儲設備
代碼:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test"
android:versionCode="1"
android:installLocation="preferExternal"
android:versionName="1.0">