This class is deprecated.
The Google Drive Android API is deprecated and will be turned down on December 6, 2019.
See themigration guidefor
instructions on migrating to the REST API.
The Drive API provides easy access to users' Google Drive contents. This API includes Activities to open or create files in users' Drives, as well as the ability to programmatically interact with contents, metadata, and the folder hierarchy.
Create a clientDriveClient
or
DriveResourceClient
to start interacting with Drive. TheDriveClient
provides access to basic Drive
functionality, and theDriveResourceClient
provides access to methods that
interact withDriveResource
objects.
Clients can be created with any of the following methods:
getDriveClient(Activity, GoogleSignInAccount)
getDriveClient(Context, GoogleSignInAccount)
getDriveResourceClient(Activity, GoogleSignInAccount)
getDriveResourceClient(Context, GoogleSignInAccount)
Be sure to pass in at least one ofSCOPE_FILE
orSCOPE_APPFOLDER
when creating theGoogleSignInAccount
.
Field Summary
public static finalApi<Api.ApiOptions.NoOptions> | API | This field is deprecated. The Google Drive Android API is deprecated and will be turned down on December 6, 2019. See the migration guidefor instructions on migrating to the REST API. |
public static finalDriveApi | DriveApi | This field is deprecated. The Google Drive Android API is deprecated and will be turned down on December 6, 2019. See the migration guidefor instructions on migrating to the REST API. |
public static finalDrivePreferencesApi | DrivePreferencesApi | This field is deprecated. The Google Drive Android API is deprecated and will be turned down on December 6, 2019. See the migration guidefor instructions on migrating to the REST API. |
public static finalScope | SCOPE_APPFOLDER | A Scope that gives 'drive.appfolder' access to a user's drive. |
public static finalScope | SCOPE_FILE | A Scope that gives 'drive.file' access to a user's drive. |
Public Method Summary
staticDriveClient |
getDriveClient(Activity
activity,
GoogleSignInAccountaccount)
This method is deprecated. The Google Drive Android API is
deprecated and will be turned down on December 6, 2019. See themigration guidefor
instructions on migrating to the REST API.
|
staticDriveClient |
getDriveClient(Context
context,
GoogleSignInAccountaccount)
This method is deprecated. The Google Drive Android API is
deprecated and will be turned down on December 6, 2019. See themigration guidefor
instructions on migrating to the REST API.
|
staticDriveResourceClient |
getDriveResourceClient(Activity
activity,
GoogleSignInAccountaccount)
This method is deprecated. The Google Drive Android API is
deprecated and will be turned down on December 6, 2019. See themigration guidefor
instructions on migrating to the REST API.
|
staticDriveResourceClient |
getDriveResourceClient(Context
context,
GoogleSignInAccountaccount)
This method is deprecated. The Google Drive Android API is
deprecated and will be turned down on December 6, 2019. See themigration guidefor
instructions on migrating to the REST API.
|
Inherited Method Summary
Fields
public static finalApi<Api.ApiOptions.NoOptions> API
This field is deprecated.
The Google Drive Android API is deprecated and will be turned down on December 6,
2019. See themigration
guidefor instructions on migrating to the REST API.
The API necessary to use Drive. Provide this as an API to
addApi(Api)
.
public static finalDriveApi DriveApi
This field is deprecated.
The Google Drive Android API is deprecated and will be turned down on December 6,
2019. See themigration
guidefor instructions on migrating to the REST API.
The entry point for interacting with the Drive APIs which provides ways to access/update the files and folders in users Drive.
public static finalDrivePreferencesApi DrivePreferencesApi
This field is deprecated.
The Google Drive Android API is deprecated and will be turned down on December 6,
2019. See themigration
guidefor instructions on migrating to the REST API.
The entry point for interacting with the Drive APIs which provides ways to access/update Drive preferences.
public static finalScope SCOPE_APPFOLDER
A Scope that gives 'drive.appfolder' access to a user's drive. This scope gives access to files that have been created by the app in the App Folder.
This scope can be provided in
requestScopes(Scope, Scope)
public static finalScope SCOPE_FILE
A Scope that gives 'drive.file' access to a user's drive. This scope give per-file access to files that have been created by, or specifically opened with the app.
This scope can be provided in
requestScopes(Scope, Scope)
Public Methods
public staticDriveClient getDriveClient(Activityactivity, GoogleSignInAccount account)
This method is deprecated.
The Google Drive Android API is deprecated and will be turned down on December 6,
2019. See themigration
guidefor instructions on migrating to the REST API.
Creates a new instance ofDriveClient
for use in anActivity
.
Error resolutions will be automatically launched from the provided
Activity
,displaying UI when necessary. This is the entry point for basic
interactions with the Drive API.
public staticDriveClient getDriveClient(Contextcontext, GoogleSignInAccount account)
This method is deprecated.
The Google Drive Android API is deprecated and will be turned down on December 6,
2019. See themigration
guidefor instructions on migrating to the REST API.
Creates a new instance ofDriveClient
for use in a non-ActivityContext
.
Error resolutions will be automatically launched from the provided
Context
,displaying system tray notifications when necessary. This is the
entry point for basic interactions with the Drive API.
public staticDriveResourceClient getDriveResourceClient(Activityactivity, GoogleSignInAccount account)
This method is deprecated.
The Google Drive Android API is deprecated and will be turned down on December 6,
2019. See themigration
guidefor instructions on migrating to the REST API.
Creates a new instance ofDriveResourceClient
for use in anActivity
.
Error resolutions will be automatically launched from the provided
Activity
,displaying UI when necessary. This is the entry point for
general management of allDriveResource
objects with the Drive API.
public staticDriveResourceClient getDriveResourceClient(Contextcontext, GoogleSignInAccount account)
This method is deprecated.
The Google Drive Android API is deprecated and will be turned down on December 6,
2019. See themigration
guidefor instructions on migrating to the REST API.
Creates a new instance ofDriveResourceClient
for use in a non-ActivityContext
.
Error resolutions will be automatically launched from the provided
Context
,displaying system tray notifications when necessary. This is the
entry point for general management of allDriveResource
objects with the Drive API.