DocumentsProvider

Class of android.provider · DocumentsProvider.java · Android's reference

public abstract class DocumentsProvider extends ContentProvider

DocumentsProvider ← ContentProvider

A provider of documents (the Storage Access Framework's): the app gives its roots, documents and their children, and this class answers the content URIs of DocumentsContract with them (content://authority/root, /document/ID, /document/ID/children, and the same under /tree/ID). The document calls that change something (create, delete, rename, copy, move, remove) are unsupported until the app implements them.

Extended in the framework by

Constructors

public DocumentsProvider() empty body source

Methods

public abstract Cursor queryRoots(String[] projection) throws FileNotFoundException source
public abstract Cursor queryDocument(String documentId, String[] projection) throws FileNotFoundException source
public abstract Cursor queryChildDocuments(String parentDocumentId, String[] projection, String sortOrder) throws FileNotFoundException source
public Cursor queryChildDocuments(String parentDocumentId, String[] projection, Bundle queryArgs) throws FileNotFoundException source
public abstract ParcelFileDescriptor openDocument(String documentId, String mode, CancellationSignal signal) throws FileNotFoundException source
public Cursor queryRecentDocuments(String rootId, String[] projection) throws FileNotFoundException throws UnsupportedOperationException source
public Cursor querySearchDocuments(String rootId, String query, String[] projection) throws FileNotFoundException throws UnsupportedOperationException source
public boolean isChildDocument(String parentDocumentId, String documentId) source
public String createDocument(String parentDocumentId, String mimeType, String displayName) throws FileNotFoundException throws UnsupportedOperationException source
public String renameDocument(String documentId, String displayName) throws FileNotFoundException throws UnsupportedOperationException source
public void deleteDocument(String documentId) throws FileNotFoundException throws UnsupportedOperationException source
public String copyDocument(String sourceDocumentId, String targetParentDocumentId) throws FileNotFoundException throws UnsupportedOperationException source
public String moveDocument(String sourceDocumentId, String sourceParentDocumentId, String targetParentDocumentId) throws FileNotFoundException throws UnsupportedOperationException source
public void removeDocument(String documentId, String parentDocumentId) throws FileNotFoundException throws UnsupportedOperationException source
public AssetFileDescriptor openDocumentThumbnail(String documentId, Point sizeHint, CancellationSignal signal) throws FileNotFoundException throws UnsupportedOperationException source
public String getDocumentType(String documentId) throws FileNotFoundException source

a document's MIME type: its COLUMN_MIME_TYPE in queryDocument

public final Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) source
public final String getType(Uri uri) source
public Bundle call(String method, String arg, Bundle extras) source

the document calls of DocumentsContract (create, rename, delete, remove, copy, move), as Android's provider answers them

public final Uri insert(Uri uri, ContentValues values) throws UnsupportedOperationException source
public final int delete(Uri uri, String selection, String[] selectionArgs) throws UnsupportedOperationException source
public final int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) throws UnsupportedOperationException source
public final ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException source
public final ParcelFileDescriptor openFile(Uri uri, String mode, CancellationSignal signal) throws FileNotFoundException source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.