Hi.
I provide additional information on how to handle and upload files to
a scdard emulator. Hope you find it useful!!!
1. create the sdcard:
1. create a directory EX: c:\temp
2. open a command prompt and gothe the directory.
3. make the sdcard via the command:
mksdcard <size> sdcard.img
2. Add mp3 files to the card:
1. start the android emulator with sdcard support:
- under the run menu click "open run dialog"
- make sure to highlight the correct project
- click the tab marked "Target"
- under the additional emulator commands enter: -sdcard c:/
temp/
sdcard.img
2. open up a command prompt in windows:
- in one window enter "adb shell"
- you now can browse the emulator file system via commands like
ls and cd
- type ls and confirm you have a directory named sdcard.
- type "cd sdcard" to change to that directory.
3. open up another command prompt
- add mp3 files to the sdcard via adb push: Here's an example:
adb push "Michael Tarbox and Howard Ferguson - Beautiful City 2-4-03
Plough & Stars.mp3"
/sdcard/"Michael Tarbox and Howard Ferguson - Beautiful City 2-4-03
Plough & Stars.mp3"
218 KB/s (0 bytes in 2889576.012s)
4. confirm addition of mp3 file:
- enter ls under the adb shell:
# ls
ls
android
Amy Winehouse - Back to Black.mp3
Sheryl Crowe - The First Cut Is The Deepest.mp3
On 22 jul, 07:26, Mark Murphy <[EMAIL PROTECTED]> wrote:
> butterflying wrote:
> > Hi, I recently learnt how to create an sdcard image but I can’t figure
> > out a way to create directories on it. So would anyone tell me how to
> > do it?
>
> Assuming there aren't permission problems, something like this should work:
>
> import java.io.File;
>
> // other really cool code here
>
> File f=new File("/sdcard/make/mine/malted");
>
> f.mkdirs();
>
> There's also a mkdir() method to just create the directory named in the
> final path segment.
>
> I have only attempted to read from the SD card, so it's entirely
> possible activities lack write access, but that would surprise me.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Warescription: All titles, revisions, & ebook formats, just $35/year
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---