Reading a file from external storage Android SDK Emulator
I am a new bie in android, I am developing an android application and I have used some ready-made libraries, now there is a view option and when I view it it gives the location / mnt / sdcard this is a basic file reader application if I use this application in mobile, then I can view the memory card, but there is even a 500MB card configured in the emulator, I don't know where to put the files, so I can access my emulator app, I expect there will be a path like C: \ Program Files (x86) \ Android \ android-sdk \ SOMEFolder where I can put my files using my computer and access my emulator. Attached is an image of my emulator
source to share
I don't know where to put the files so that I can access the application in my emulator ...
You can use adb push command as
adb push <filename> <target>
(see http://developer.android.com/guide/developing/tools/adb.html for more information) or just use "Explorer" in DDMS perspective then select a folder in your SD card folder and select "push file to device "to put your files in this folder in the emulator:
And you can use
Environment.getExternalStorageDirectory().getAbsolutePath()
to access the absolute path of the sd card.
source to share
if you want to save some files on the emulator sd card then ddms-> file explorer-> sdcard then paste the file into the device as shown in the picture
when you click on the icon notified by the circle, a browse dialog will pop up, then preview the file and as you select save, the file will be saved to the emulator's SD card
source to share