简体   繁体   中英

Download image from URL and save it in my app's drawable-hdpi folder

I need to download an image from url and save it in the app's drawable-hdpi folder and then show it in ImageView. How I can do it?

I tried using this and this code but it's not a good solution for me because this code saves on the SDCard.

You cannot save in the app package. You only have these options:

Your data storage options are the following:

Shared Preferences Store private primitive data in key-value pairs. Internal Storage Store private data on the device memory. External Storage Store public data on the shared external storage. SQLite Databases Store structured data in a private database. Network Connection Store data on the web with your own network server.

more information: http://developer.android.com/guide/topics/data/data-storage.html

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