<div dir="ltr">We had a look at it.<div><br></div><div>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.</div><div>That's not user friendly, so we did not spend time on it.</div><div><br></div><div>But if you have something, we are interested by your patch for sure :)</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 5, 2015 at 11:52 AM XilasZ <<a href="mailto:xilasz@gmail.com">xilasz@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hello,
<br>

<br>
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.
<br>
In lolipop, google introduce yet another API to change that.
<br>

<br>
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.
<br>
After that, it's possible to write in that folder using DocumentFile API from the tree uri.
<br>

<br>
I did some testing, i implemented a preference to select/set write permissions and get tree uris (and revoke them by selecting them again).
<br>

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

<br>
So the patch is mainly a poc, but that's a start, what do you think ?</p>
_______________________________________________<br>
Android mailing list<br>
<a href="mailto:Android@videolan.org" target="_blank">Android@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/android" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/android</a><br>
</blockquote></div>