Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing android:installLocation from preferExternal to internalOnly

I have an app on Google Play market and I added android:installLocation="preferExternal" to manifest.xml file and released long time ago. Now I would like to add Android home screen widget, so I need to change it to android:installLocation="internalOnly". If I do that, what happens when a user upgrades? because a user already installed the old app on SD card. What is the best solution for this situation??

If someone has this kind of experience, please advise me.

Thanks in advance :)

like image 950
mooongcle Avatar asked Mar 25 '13 16:03

mooongcle


1 Answers

When you set install location to preferExternal the application specific files are stored in .android_secure directory in external sdcard.

These type of application are not available when user mounts the SD Card as USB Mass Storage (feature removed from Android Jelly Bean).

Coming to the question, I believe in your case the application would be installed onto internal memory with the files from .android_secure moved to internal location.

You can confirm this by the following:

  1. Install the application from play store having install Location as preferExternal.
  2. Confirm that your application is installed in external SD card, you can use Settings->App to check that.
  3. Now create your new signed application package.
  4. Install using adb install -r myapp.apk
  5. Again goto Settings->App and confirm the location.
  6. Run functional test to see if nothing is broken.
like image 105
PravinCG Avatar answered Sep 17 '22 17:09

PravinCG