What is the best way to store the image in the memory of app?

后端 未结 4 1117
再見小時候
再見小時候 2021-01-16 07:38

I\'m using sqlite db in my app and now I would like to allow user customize the background image make them able to select one from their gallery.

Should I just store

4条回答
  •  佛祖请我去吃肉
    2021-01-16 07:56

    In my opinion, the best way to save the customized background image is copy it into the internal storage (private storage) of your application. If you store only the path of the file, then file cannot be available once the user deleted that. The official docs saying about the internal storage is:

    • It's always available.
    • Files saved here are accessible by only your app by default.
    • When the user uninstalls your app, the system removes all your app's files from internal storage.

提交回复
热议问题