Is there any possibilities to add some image, media or any file to emulator in Android? [duplicate]
Possible Duplicate:
How to Store files on Emulator?
I'm trying to add some files to emulator. Is it possible to do that.
You can use adb push
as explained here:
adb push c:\somefile.txt /sdcard
why not for example
String path = Environment.getExternalStorageDirectory().getAbsolutePath();
File mfile = new File(path, "sample.txt");
mfile.mkdir();
this will create a "sample.txt" file on your sdcard
you can also push file from ddms select the device from the device window in the ddms and click on the File Explorer tab now select the sdcard.
Now on right side of File Explorer window two button are their which are enable to you for file import or export to the device to pc and vice versa
here is the image: File Explorer Screenshot
精彩评论