简体   繁体   中英

How can I download a file to my downloads folder android

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.

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.

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

您也可以通过在外部存储中创建文件夹来将下载的文件保存到特定文件夹。当下载完成后,您可以显示它(即如果您下载的图像可以在imageview中显示)

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