Here is my problem : I am developing an app that requires a lot of images. Now I want the images to be part of the APK file but I would very much like to move them all to SD card so my app isn’t taking like 20-30Mb of phone’s storage.
As for now images are all in drawables folder but I was wondering if there was anyway I could move them all to SD card (for example on first startup after install) and remove them from phone’s storage ?
Maybe using assets ?
If any of you think of a great mechanism to achieve that, please tell me !
You should not bundle your images with the app itself. Instead, download them when the user first launches your app and save them to the external Storage.
Even if you copy images from your Assets folder to the external storage, your app still takes up the same amount of space on Internal Storage as the assets folder cannot be modified after compilation. It is read only. So in reality you will end up with two copies of the same data, and consume even more space.
You could also look into allowing the user to move your app to the external storage. Keep in mind that some applications cease to function properly when this is enabled and the external storage is unmounted.