Wednesday, February 8, 2012

Re: [android-developers] Problem with writing files to internal memory (not visible on file browser on ICS)

On Wed, Feb 8, 2012 at 4:53 PM, Dirk Vranckaert
<dirkvranckaert@gmail.com> wrote:
> I have a problem when I try to write a file to the device's SD-card.
>

> 6) Samsung Galaxy Nexus (running 4.0) with the 16 GB build-in SD =>
> problem!!
>
> The problem I have is that I cannot see the file that is created:
> a. when I use a file browser on the device
> b. when I connect the device to my windows computer (windows 7)

You need to call MediaScannerConnection.scanFile() to get the files
to show up. Check the external storage sample code:

http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/content/ExternalStorage.html

This is not a bug, it's a feature :)

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment