Reputation: 6993
'On my smart phone there is a option to move your app to external storage. On most of the apps, including mine this is greyed out. I tried giving my app permissions to write to external memory,
My app still cannot be moved to external storage. How do you get your app so it can be moved to external storage?
Upvotes: 0
Views: 105
Reputation: 3771
How to allow users to select the Android app's installation location (SD card or internal storage)
"Unfortunately, It's not possible to explicitly let user choose where to install your app.
Before it's installed, your app can't run so you can't run any code at that time.
Options you mention: "internalOnly", "auto" and "preferExternal" are only options.
From personal experience, I recommend you to use "auto" unless you have some restrictions that force you to use "internalOnly".
"preferExternal" can produce errors on some older devices ("can't open SD card" or something like that, I can't remember)."
TL;DR
You cant tel it where to go.
use android:installLocation="preferExternal"
in the manifest and itll try its best to put it there.
Upvotes: 1
Reputation: 35651
See the InstallLocation
attribute in the android.manifest
http://developer.android.com/guide/topics/data/install-location.html
If you declare "auto", you indicate that your application may be installed on the 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.
Upvotes: 1