Move applications to SD card
In some apps w开发者_高级运维ith min sdk 3 (Android 1.5), I can move application to SD card from my Desire HD.(Android 2.2) How to make it programmatically possibility to move application to SD card with Requires Android 1.5 and up.
Add android:installLocation="auto" attribute in the tag of your manifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mycompany.myapp" android:installLocation="auto"
android:versionCode="2" android:versionName="1.2">
it will enable the Move to SD card button for your application.
You need to include android:installLocation="auto"
or android:installLocation="preferExternal"
in the <manifest>
element of your AndroidManifest.xml. You also need to set target API version to Froyo for that (but minimum API version can be lower).
More info: http://developer.android.com/guide/appendix/install-location.html
<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>
For reference check this
精彩评论