DocumentsProvider.QueryRoots(String[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Return all roots currently provided.
[Android.Runtime.Register("queryRoots", "([Ljava/lang/String;)Landroid/database/Cursor;", "GetQueryRoots_arrayLjava_lang_String_Handler")]
public abstract Android.Database.ICursor? QueryRoots (string[]? projection);
[<Android.Runtime.Register("queryRoots", "([Ljava/lang/String;)Landroid/database/Cursor;", "GetQueryRoots_arrayLjava_lang_String_Handler")>]
abstract member QueryRoots : string[] -> Android.Database.ICursor
Parameters
- projection
- String[]
list of Root
columns to put into the cursor. If
null
all supported columns should be included.
Returns
- Attributes
Exceptions
Remarks
Return all roots currently provided. To display to users, you must define at least one root. You should avoid making network requests to keep this request fast.
Each root is defined by the metadata columns described in Root
, including Root#COLUMN_DOCUMENT_ID
which points to a directory representing a tree of documents to display under that root.
If this set of roots changes, you must call ContentResolver#notifyChange(Uri, android.database.ContentObserver, boolean)
with DocumentsContract#buildRootsUri(String)
to notify the system.
Java documentation for android.provider.DocumentsProvider.queryRoots(java.lang.String[])
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.