简体   繁体   中英

Android, Not sure if I should store to the internal storage or external storage

I have an app out there on the market already The app is not a game just an informative app with lots of pictures and stats and I received a comment from someone stating that the size of the app being 20Mb is being stored on the "internal storage which isn't fair and that some of it should be stored on the SD card."

Now I am still trying to learn everything about android coding but is this a big deal so that I should move all those images to the external storage like the SD card? Is 20Mb to the internal storage too much or what number in Mb should I look out for to know when to store to an external? I looked at the storage documentation here and it states that the user can modify when they enable USB mass storage to transfer files on a computer, so does this pose a risk to my app breaking if the user modifies/removes/changes anything?

This is no different to a computer having two hard drives, a boot disk and a second disk.

Obvious if you can store using the second disk/external storage, you are generally better off as the internal storage has many uses and usually fills up first.

Generally speaking it is best to leave it to the user to decide but I would store on the external storage by default.

For an older phones it is a big deal, believe me. The best option would be to let user choose, which storage he wants to use, in some sort of configuration dialog.

You are looking for installLocation . Just change one thing in the manifest and let users choose where the APK is installed.

Note: By default, your application will be installed on the internal storage and cannot be installed on the external storage unless you define this attribute to be either "auto" or "preferExternal".

If the app requires those files then do not put them in external storage as that will allow the user to remove them.

If they can be removed/altered then you should put them in external storage.

You could also do a mix of the two so that the size could be reduced without sacrificing the necessary components.

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