I do not think there is any permission required to write to the SDcard, if
it is there.This works for me:
File sdcard = Environment.getExternalStorageDirectory();
File destination = new File(sdcard, "mydir");
if (destination.mkdir()){
Log.e(TAG, "made directory");
} else {
Log.e(TAG, "could not mkdir");
}
What is the string you provide to the -sdcard option for your emulator?
Ludwig
2008/10/28 Thao <[EMAIL PROTECTED]>
>
> Hi Ludwig,
>
> Unfortunately, I have ran the emulator with -sdcard option. I can
> browse the sdcard content via the DDMS perspective with eclipse.
>
> What I also notice is that if I try to create some folder (via the
> code) on the SDCARD it fails. Whereas trying to create folder with the
> same code in the "data/data/myApplication" folder works fine.
> I've also tried to open the same custom DB ( as named above ) from the
> "data/data/myApplication/databases" and this is successful. I can list
> DB's item.
> But no way to access from SDCARD.
>
> What leads me to think about permission...Do you have any clue ?
>
> Thanks a lot.
>
> On Oct 28, 4:06 pm, Ludwig <[EMAIL PROTECTED]> wrote:
> > Do you actually have an SD card in the emulator?
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---