com.google.android.gms.drive.DriveApi |
The main entry point for interacting with Drive. This class provides methods for obtaining a reference to a file or folder, or querying across the entire Drive.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DriveApi.ContentsResult |
This interface is deprecated.
Use DriveApi.DriveContentsResult instead.
|
||||||||||
DriveApi.DriveContentsResult | Result that contains a DriveContents . |
||||||||||
DriveApi.DriveIdResult | Result that contains a DriveId . |
||||||||||
DriveApi.MetadataBufferResult | Result that contains a MetadataBuffer . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
Stop using
Contents and use DriveContents and
discard(GoogleApiClient) instead.
| |||||||||||
Retrieves a
DriveId object that can be used in further drive api operations (e.g. | |||||||||||
Retrieves a
DriveFolder object that can be used to interact with the App
Folder. | |||||||||||
Retrieves a
DriveFile object that can be used to interact with the file specified by
the provided DriveId. | |||||||||||
Retrieves a
DriveFolder object that can be used to interact with the folder specified
by the provided DriveId. | |||||||||||
Retrieves a
DriveFolder object that can be used to interact with the root folder. | |||||||||||
This method is deprecated.
Use
newDriveContents(GoogleApiClient) instead.
| |||||||||||
Creates a builder for a Create File activity where a user can select a file name and
destination for a new binary file in their Drive with the contents and additional metadata
provided in the builder.
| |||||||||||
Retrieves a new
DriveContents instance that can be used to provide initial contents
for a new file. | |||||||||||
Creates a builder for an Open File activity that allows user selection of a Drive file.
| |||||||||||
Retrieves a collection of metadata for the files and folders that match the specified query.
| |||||||||||
Requests synchronization a
PendingResult that is ready when synchronization has
completed. |
This method is deprecated.
Stop using Contents
and use DriveContents
and
discard(GoogleApiClient)
instead.
Retrieves a DriveId
object that can be used in further drive api operations (e.g.
getFile, getFolder).
apiClient | The GoogleApiClient to service the call. |
---|---|
resourceId | The Drive resource id for the DriveId to retrieve. |
Retrieves a DriveFolder
object that can be used to interact with the App
Folder. This method will return synchronously, and is safe to invoke from the UI thread.
The AppData scope is required to access this folder. If the app does not have
DRIVE_APPFOLDER
it will return null.
apiClient | The GoogleApiClient to service the call. The client must be
connected using connect() before invoking this method.
|
---|
Retrieves a DriveFile
object that can be used to interact with the file specified by
the provided DriveId.
apiClient | The GoogleApiClient to service the call. The client must be
connected using connect() before invoking this method.
|
---|
Retrieves a DriveFolder
object that can be used to interact with the folder specified
by the provided DriveId.
apiClient | The GoogleApiClient to service the call. The client must be
connected using connect() before invoking this method.
|
---|
Retrieves a DriveFolder
object that can be used to interact with the root folder.
This method will return synchronously, and is safe to invoke from the UI thread.
apiClient | The GoogleApiClient to service the call. The client must be
connected using connect() before invoking this method.
|
---|
Creates a builder for a Create File activity where a user can select a file name and destination for a new binary file in their Drive with the contents and additional metadata provided in the builder.
Retrieves a new DriveContents
instance that can be used to provide initial contents
for a new file. The returned contents will be in MODE_WRITE_ONLY
and can be
used to write the initial contents through the file APIs provided in DriveContents
.
To be persisted, the contents must be saved by being passed as initial contents to
createFile(GoogleApiClient, MetadataChangeSet, DriveContents)
or
setInitialDriveContents(DriveContents)
.
To discard the contents without saving them, invoke
discard(GoogleApiClient)
.
apiClient | The GoogleApiClient to service the call. The client must be
connected using connect() before invoking this method. |
---|
Creates a builder for an Open File activity that allows user selection of a Drive file.
Upon completion, the result Intent will contain the DriveId
for the selected file.
This activity will authorize the requesting app to interact with the selected file.
Retrieves a collection of metadata for the files and folders that match the specified query.
apiClient | The GoogleApiClient to service the call. The client must be
connected using connect() before invoking this method. |
---|---|
query | The query that will restrict the contents of the result set. |
release()
when you're done with the result.
Requests synchronization a PendingResult
that is ready when synchronization has
completed.
apiClient | The GoogleApiClient to service the call. The client must be
connected before invoking this method.
|
---|