[android-developers] Re: File.setReadable not available before API level 9
On May 5, 4:15 pm, Mark Murphy <mmur...@commonsware.com> wrote:
> setReadable() is not your problem -- all files on external storage are readable.
>
> If you are running into this problem on Android 3.0+ devices, you need
> to index your file:
>
> http://commonsware.com/blog/2011/08/31/mtp-external-storage.html
Thanks. You were right. All I needed to do was:
final String[] arrayOfPaths = {outfile.getAbsolutePath()};
MediaScannerConnection.scanFile(this, arrayOfPaths, null, null);
just after closing outfile and now the file appears in Windows
explorer via USB. And you were also right that the device I was
testing on was Android 3.0
--
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
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home