简体   繁体   中英

Allowing Android system apps to move to SD card

I have a requirement to enable my apps to have the move to sd card feature enabled. For this I changed the installLocation to auto . This worked when the app was installed for the first time ie as a standalone app.

We happen to have the app as System app in some OEMs. In those cases, changing the installLocation to auto didn't work.

So, here are my queries:

  • Is installLocation forced to internalOnly for system apps?
  • Is there a way to allow system apps to move to sd card (by code)?
  • Also, if a system app gets updated with new manifest wherein installLocation changes from internalOnly to auto , shouldn't that allow movement to SD card?
  • Can OEM (Mobile manufacturer like Samsung, LG, etc) decide on enabling "Move to SD card" feature for a system app and what are the consequences for that?
  1. Is installLocation forced to internalOnly for system apps?

yes, you are right they are store in internal storage.

  1. Is there a way to allow system apps to move to sd card (by code)?

No, you can't move these apps to external storage by code or from settings.

  1. Also, if a system app gets updated with new manifest wherein installLocation changes from internalOnly to auto, shouldn't that allow movement to SD card?

I don't thing so they are updated like these as you mention above. Also, in Auto system decides where to store application whether on internal storage or in external storage

please refer below link for reference.

https://developer.android.com/guide/topics/data/install-location.html

please let me know if you are still confuse.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM