Reputation: 693
how to allow app to install on SD card?
android:installLocation=""
allow but I need to work it also on 2.0 version (this works only on 8 sdk and up)
Upvotes: 0
Views: 2280
Reputation: 1
Beginning with API Level 8, you can allow your application to be installed on the external storage (for example, the device's SD card). This is an optional feature you can declare for your application with the android:installLocation manifest attribute. If you do not declare this attribute, your application will be installed on the internal storage only and it cannot be moved to the external storage.
To allow the system to install your application on the external storage, modify your manifest file to include the android:installLocation attribute in the element, with a value of either "preferExternal" or "auto". For example:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="your package name"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="preferExternal">
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
<application>
...
</application>
Upvotes: 0
Reputation: 67296
I think you should check this blog which clearly mentions that this feature is not suporrt below API level 8.
Upvotes: 1
Reputation: 109257
To allow installation on external storage and remain compatible with versions lower than API Level 8:
When your application is installed on a device with an API Level lower than 8, the android:installLocation attribute is ignored and the application is installed on the internal storage.
For more look at App Install Location
Upvotes: 3