Android Move Application To SDCard
Last Updated: March 6, 2013
In this tutorial you will learn how to allow users that don’t have a huge amount of internal memory to move your Android application into an external SD Card storage. Unfortunately, the ability to install on the external storage is a feature available only on devices running API Level 8 (Android 2.2) or greater. When your application is installed on a device with an API Level lower than 8, the “android: installLocation” attribute is ignored. So lets begin…
Create a new project in Eclipse File > New > Android Application Project. Fill in the details and name your project MovetoSDTutorial.
Application Name : MovetoSDTutorial
Project Name : MovetoSDTutorial
Package Name : com.androidbegin.movetosdtutorial
Open your AndroidManifest.xml, and paste the following code.
Steps to Move Application to External SD Card.
Scroll down and locate Applications.
In your Downloaded tab, locate the application named MovetoSDTutorial.
Tap on Move to SD card to move application to external storage.
Try changing android: installLocation=”auto” to android: installLocation=”preferExternal” in your AndroidManifest.xml. If you declare “preferExternal”, you requested that your application to be installed on the external storage, but the system does not guarantee that your application will be installed on the external storage. If the external storage is full, the system will automatically install it on the internal storage. By doing this, the user has the option to move your application between the two locations.
[purchase_link id=”7870″ text=”Purchase to Download Source Code” style=”button” color=”green”]