[Android] Writing on external sdcard

Geoffrey Métais geoffrey.metais at gmail.com
Wed Aug 5 12:11:03 CEST 2015


We had a look at it.

Getting write permission for the whole SD card requires user select the SD
card root folder in Google picker UI, then we store this permission.
That's not user friendly, so we did not spend time on it.

But if you have something, we are interested by your patch for sure :)

On Wed, Aug 5, 2015 at 11:52 AM XilasZ <xilasz at gmail.com> wrote:

> Hello,
>
> As you may know, since KitKat, apps can't write on external sdcards
> (except in app private folder, but using a new API), so we can't delete
> file on external sdcard anymore.
> In lolipop, google introduce yet another API to change that.
>
> First, the app calls ACTION_OPEN_DOCUMENT_TREE to ask the user to select a
> folder (for instance /sdcard2/Movies), it return a tree uri
> (/tree/3638-3334:Movies) and then we can set a write permission on this
> folder.
> After that, it's possible to write in that folder using DocumentFile API
> from the tree uri.
>
> I did some testing, i implemented a preference to select/set write
> permissions and get tree uris (and revoke them by selecting them again).
>
> I don't know yet how to know if a path is under a tree uri, how to get a
> DocumentFile from a real path (/sdcard2/Movies/blabla.mp4), or if it's even
> possible.
>
> So the patch is mainly a poc, but that's a start, what do you think ?
> _______________________________________________
> Android mailing list
> Android at videolan.org
> https://mailman.videolan.org/listinfo/android
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/android/attachments/20150805/950fee1c/attachment.html>


More information about the Android mailing list