I know move to sd card feature is available from android 2.2 I want to know is there way to detect in my program if device supports move to sd card feature, if its supported it can be moved else if not supported than nothing will happen(will be in phone memory)
My main issue is my app is supporting all devices from 1.6 to above, and i can't use
android:installLocation="auto"
because its not recognized for below version 2.2 . So do i have to do checking and enabling programmatically and if so how ? I hope you understand my problem.
Thanks.
To allow installation on external storage and remain compatible with versions lower than API Level 8:
Include the android:installLocation
attribute with a value of "auto
" or "preferExternal
" in the <manifest>
element.
Leave your android:minSdkVersion
attribute as is (something less than "8") and be certain that your application code uses only APIs compatible with that level.
In order to compile your application, change your build target to API Level 8. This is necessary because older Android libraries don't understand the android:installLocation
attribute and will not compile your application when it's present.
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.
This is what Android's Backward Compatibility Says.
Also refer Applications That Should NOT Install on External Storage and Applications That Should Install on External Storage
While the programmatic features are available from 2.2 and above, the actual move to sd feature is not actually possible on every phones, even when there is an internal or even external SD card!
In ICS and JB now, the OS can decide to move apps TO SD by itself, while users don't have any option to move apps manually to/from SD card!
This behavior has been tested on Galaxy Nexus, Galaxy S3, Galaxy Tab 2, Transformer and Iconia A500 both with ICS and JB! None of them had move-so-sd button!
So it would still be interesting to find out if user can move apps to SD at runtime.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With