Search code examples
androidimageview

Is it possible to generate resource id for downloaded images in android


I am downloaded images from internet, is it possible to generate resource id for downloaded images.


Solution

  • No. Resource IDs work only for resources packaged with the rest of the application in the .apk file. You'll have to use other I/O methods to access the images. You can save the images using Environment.getExternalStorateDirectory() to obtain a File for the directory and then you can save and later read the image using normal file I/O operations.