Allow Android app to install on SD card

A common problem which can turn users off your app is not having the option to transfer the app to their SD card hence clogging up their phone. Chances are they'll uninstall as soon as they can. Users may have apps such as AppMgr III (App 2 SD) installed which will automatically try and move any installed apps to their SD card.

Luckily as a developer enabling this is incredibly simple - it's one line in the AndroidManfiest.xml.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.your.package.name"
    android:versionCode="1"
    android:versionName="1.0"

    android:installLocation="auto" >

The section highlighted in green is all you need to add. You have two options here:

  1. auto - this enables the app to be installed on the SD card, but you don't have a preference and you leave it up to the user. This is the option I always go for. Once installed the app can freely move between internal and external.
  2. preferExternal - this also enables the app to be installed on the SD card but you also try and install it there by default if there is available space. If there isn't it will default to internal phone storage. Once installed the app can freely move between internal and external.
That is all there is to it - a one line change which makes a massive difference to your user retention rates. The full documentation can be found here.

Comments

Popular posts from this blog

Android: Programmatically get list of installed apps on an Android device

Integrating Google Analytics into existing Android app

Update eclipse Android Development Toolkit to version 23.0.0