Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move applications to SD card

Tags:

android

In some apps with 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.

like image 491
android_dev Avatar asked May 10 '11 09:05

android_dev


People also ask

Can Apps be moved to SD card?

You can move apps to an SD card from the Apps section of an Android phone's Settings with just a few taps. If your Android phone has an SD card slot, you can move apps out of internal storage. Storing apps on an SD card can free up space on your phone for other apps and data.

Why can't I move an app to my SD card?

Reason 1.Developers of Android apps need to explicitly make their apps available to move to the SD card using the “android:installLocation” attribute in the <manifest> element of their app. If they don't, the option to “Move to SD card” is grayed out.


2 Answers

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.

like image 114
Omar Rehman Avatar answered Sep 25 '22 10:09

Omar Rehman


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

like image 30
Xion Avatar answered Sep 22 '22 10:09

Xion