I need to take a given drawable name from a cloud DB and check to see if a matching Drawable exists in the local package. If it doesn’t, I need to create a local copy of the image for use so I’m not constantly accessing the remote resource. What’s the best way to do this? I can access the database, do the SQL, all that stuff. I just need to know how to A) check the local package for the existence of a Drawable called (for instance) ‘icon,’ and if it doesn’t exist locally I need to know how to create and store a local copy (via HTTPstream maybe?).
Share
1: Check for your drawable like this:
2: You can’t put a downloaded drawable inside drawableFolder. But you can download it to res/raw or to the sdcard. Note to check that location also if you already downloaded this particular drawable.