It is very simple to
enable move to SD card feature in Android applications, all you need to do is
specify the installLocation attribute in Android manifest as ‘auto’.
1 2 3 4 5 6 7 | <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.prgguru.sdmovable" android:versionCode="1" android:versionName="1.0" android:installLocation="auto"> ... </manifest> |
installLocation attribute can be
assigned with following values:
auto
|
It indicates that your application may be installed on the
internal memory (or) external storage, but you don’t have a preference of
install location. The system will decide where to install your application
based on several factors. The user can also move your application between the
two locations.
|
internalOnly
|
If you’re certain that your application should never be
installed on the external storage, assign installLocation attribute value as
‘internalOnly’.
|
preferExternal
|
You request that your application 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 install it on the internal storage. The user can also move your
application between the two locations.
|