Android - Saving a downloaded image from URL onto SD card

前端 未结 2 1135
遥遥无期
遥遥无期 2020-12-30 15:21

I am loading an image from an URL on button click, and storing it as a Bitmap. Now i want to know how to save that downloaded image into sd card as well as in system.

<
2条回答
  •  伪装坚强ぢ
    2020-12-30 16:00

    You will need to first create the directories and sub-directories where you want to create the files. I see that you used the mkdir() method. Try mkdirs(), and it should work.

提交回复
热议问题