3

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.

Community
  • 1
  • 1
Boris Kuzevanov
  • 1,232
  • 1
  • 12
  • 21

1 Answers1

6

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

Sandro Machado
  • 9,921
  • 4
  • 36
  • 57
  • Yes, the apk file/ folders structure is create in build time so it is impossible to add a new image to the drawable hdpi folder – Sandro Machado Oct 13 '14 at 11:29