How can I download a file to my downloads folder android

纵饮孤独 提交于 2019-12-10 17:34:53

问题


I want to download a file using android to my sdcard and then see it from my android emulator. I can download a file to

/mnt/sdcard/myfile.jpg

I want to see this file from my android emulator.

Or I can download it to my downloads folder.


回答1:


Please check this example for downloading and saving the file: http://www.androidsnippets.com/download-an-http-file-to-sdcard-with-progress-notification. After you downloaded the file you can see it in the DDMS perspective, at the "file explorer" view. There will be an "sdcard" folder. Please also be sure that you set the size of the emulator's SD card when you created the emulator.




回答2:


From what I understood what you need is a File Browser on your emulator .

Here's a random File Browser I found ( Google search ) .

Download the apk and install it with adb :

adb install MAndFileBrowser.apk



回答3:


U can save downloaded file to specific folder also by creating folder in external Storage.and when the download gets complete u can display it(i.e if u r downloading image u can show in imageview)



来源:https://stackoverflow.com/questions/8687849/how-can-i-download-a-file-to-my-downloads-folder-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!