java.lang.Object | |
↳ | com.google.android.gms.drive.metadata.MetadataField<T> |
![]()
|
Note: The Google Drive Android API is currently in developer preview. Applications compiled using this version of the API will continue to operate on devices using future versions of Google Play services; however, changes to the API are expected in future releases.
A single metadata field that can be used as part of file queries. Instances of this class (such
as the static values in SearchableField
) can be used
to create filters for file queries.
For example, the following code will find all files that are starred and have the MIME type type "text/plain":
Date oneHourAgo = new Date(System.currentTimeMillis() - (60 * 60 * 1000)); Filter starredFilter = Filters.eq(SearchableField.STARRED, true); Filter mimeTypeFilter = Filters.eq(SearchableField.MIME_TYPE, "text/plain"); Query query = new Query.Builder().addFilters(starredFilter, mimeTypeFilter).build(); for (Metadata metadata : Drive.DriveApi.query(apiClient, query).await().getMetadataBuffer()) { System.out.println(metadata.getTitle()); }
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() |