On Nov 12, 1:11 am, cctools <[email protected]> wrote:
> My app polls a directory on the SDcard for the appearance of new files
> that where dropped there by the user from Windows file explorer over
> the USB connection. When a new file appears, my app processes it, and
> then deletes it, however the file still shows up in Windows file
> explorer. I know the file is gone because it no longer appears in the
> DDMS file explorer, and my poller doesn't get triggered again.
>
>  I've tried playing around with MediaScannerConnectionClient, which
> helps with getting programatically created directories to appear, but
> does nothing to get files to disappear.
>
> If I refresh Windows explorer on the PC, the deleted files still show
> up. If I unplug the USB, wait for a minute for Windows to dismount the
> SDcard, and then plug the USB back in, the files are still there.
> However, if I soft reboot the device, the files are gone. This makes
> me think the problem is on the Android side.
>
> Any insights into how Android interacts with Windows file explorer
> would be appreciated - I would really like my users to have an
> accurate picture of what's on the SDcard, without needing to reboot
> Android.
>
> I'm running Android 3.2 on an Acer Iconia A500. My PC is running
> Windows XP. The files are .csv and .txt files. I'm using File.delete()
> to delete them.

I'm no Android expert and I really just joined this group to learn,
not answer questions or help, but I had trouble with corrupted folders
files when I tried to transfer them from my Win XP OS to my new, 4GB
SD card on my Android smartphine via tethering. I had earlier copied
them from my old 2 GB SD card  to a folder in "My Documents" that I
created, I then realized that maybe the reason that the files became
corrupted was not because I had copied them from the FAT32-formatted
SD card TO an NTFS formatted hard drive partition with Windows XP, but
was when I tried to copy and transfer them back to the new SD Card
which I had previously  partitioned with FAT32 which is the default
format filesystem for Android apps,.

So I created a new but FAT32 filesystem  partition for my HDD and
redid the steps above and sure enough the folders and files were
perfect on my new  SD Card. So maybe that is similar to the problem
that you are having as well, the files that you want to delete on the
pc with your app also are in an NTFS formated partition and not
FAT32..

-- 
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

Reply via email to