Questions tagged [documentfile]

DocumentFile Class represent a document backed by either a DocumentsProvider or a raw file on disk.

This is a utility class designed to emulate the traditional File interface. It offers a simplified view of a tree of documents, but it has substantial overhead. For optimal performance and a richer feature set, use the DocumentsContract methods and constants directly.

93 questions
0
votes
1 answer

MtpDevice.importFile and DocumentFile

MtpDevice.importFile(int objectHandle, String destPath) fails on 4.4 and above. Is there a way to import from an MtpDevice with the SD card write lock?
Anthony
  • 7,638
  • 3
  • 38
  • 71
0
votes
1 answer

Using Intent.ACTION_VIEW together with DocumentFile class

I use this code to achieve "Open in" function for File Class (java.io.File): ... MimeTypeMap mime = MimeTypeMap.getSingleton(); String type = mime.getMimeTypeFromExtension(fileExtension); Intent intent = new…
Quark
  • 1,578
  • 2
  • 19
  • 34
0
votes
1 answer

Using Android Storage Access Framework and direct file access together

I have an app that extensively uses file system including external SD card. Currently it uses File APIs to create/delete/list files but I would like to use new Android Storage Access Framework. Issue is that almost 60% of install base is still on JB…
nLL
  • 5,662
  • 11
  • 52
  • 87
1 2 3 4 5 6
7