tags:

views:

62

answers:

1

Hi Friends,

is there any way to write data to a sdcard when the card is mounted as a disc via usb? If I unplug it everything is fine.,how to solve this problem?anybody knows,please give sample code for me.

Thanks All

A: 

Android allows only one mount at a time, so if you connect your device via USB and provide the card as a mount for your pc, android unmounts the card from the OS. That behavior cant be changed by an application and shouldnt be changed in the name of the data security.

WarrenFaith
@have any coding for mount sdcard using USB
sivaraj
and here I go again: you can't mount an sd card which is connected via USB. Android unmount the sd card if you give it free for usb usage. That means that as long as the USB connection is available and the card is mounted by your connected PC, you can't access the sd card. Anyway the mount/unmount of an sdcard should be handled by android OS, not your application. You can only check the state of the sdcard...
WarrenFaith
@ok i understand,for example device camera shot image and store in sdcard,How?
sivaraj
try to search, plenty of questions and answers here on stackoverflow...
WarrenFaith
@WarrenFaith,i got the solution,
sivaraj