Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Anggrayudi H anggrayudi

🏠
Working from home
View GitHub Profile
@anggrayudi
anggrayudi / DocumentFileCompat_fromPath.java
Last active Dec 14, 2020
Easy Storage Access Framework in Android with SimpleStorage
View DocumentFileCompat_fromPath.java
DocumentFile file = DocumentFileCompat.fromSimplePath(context, "14EC-BF55", "Movies/Horror/The_Conjuring.mp4");
@anggrayudi
anggrayudi / DocumentFile_getFile_API_30.java
Created Sep 30, 2020
Easy Storage Access Framework in Android with SimpleStorage
View DocumentFile_getFile_API_30.java
DocumentFile file = DocumentFile.fromTreeUri(Uri.parse("content://com.android.externalstorage.documents/tree/14EC-BF55%3AMovies%2FHorror/document/14EC-BF55%3AMovies%2FHorror%2FThe_Conjuring.mp4"));
@anggrayudi
anggrayudi / DocumentFile_findFiles.java
Created Sep 30, 2020
Easy Storage Access Framework in Android with SimpleStorage
View DocumentFile_findFiles.java
DocumentFile rootFolder = DocumentFile.fromTreeUri(Uri.parse("content://com.android.externalstorage.documents/tree/14EC-BF55%3A"));
DocumentFile file = rootFolder.findFile("Movies").findFile("Horror").findFile("The_Conjuring.mp4");
@anggrayudi
anggrayudi / DocumentFile_directFile.java
Last active Sep 30, 2020
Easy Storage Access Framework in Android with SimpleStorage
View DocumentFile_directFile.java
DocumentFile.fromTreeUri(Uri.parse("content://com.android.externalstorage.documents/tree/14EC-BF55%3AMovies%2FHorror%2FThe_Conjuring.mp4"));