开发者

Content Providers or Application Cache directory for storing image path

开发者 https://www.devze.com 2023-02-12 03:56 出处:网络
i am trying to perform an action where i can access and tag images stored in the sd-card from my application based on certain actions.

i am trying to perform an action where i can access and tag images stored in the sd-card from my application based on certain actions. i would like to know the best way to temporary store the image path or the images, so that the application always remembers the se开发者_运维百科t tagged images when ever it gets restarted(so the user does not have to do it all over again) and the images are still available on the sdcard when the application gets deleted or uninstalled.

should i use a content provider or the applications cache?.. Any other solution is highly appreciated.


I would simply store the path to the images in a sqlite database. That has the added benefit that if there's any additional data you'd like to associate with the image, you can just add fields to the sqlite table.

You could implement a content provider for the functionality, but that might be overkill. The easiest way would be to write to the database.

0

精彩评论

暂无评论...
验证码 换一张
取 消