DrivePreferencesApi Stay organized with collections Save and categorize content based on your preferences.
Page Summary
The
DrivePreferencesApiinterface is deprecated and will be turned down on December 6, 2019.Developers should migrate to the REST API.
This API allows for retrieving and updating Drive preferences specific to the current user and calling application.
The preferences, such as
getFileUploadPreferencesandsetFileUploadPreferences, control how files are uploaded from the current device to the server.
This interface is deprecated.
The Google Drive Android API is deprecated and will be turned down on December 6, 2019. See themigration guide for instructions on migrating to the REST API.
The entry point for retrieving and updating Drive preferences. The preferences set by these APIs are applied only to the current user account and the calling application.
Nested Class Summary
| interface | DrivePreferencesApi.FileUploadPreferencesResult | This interface is deprecated. The Google Drive Android API is deprecated and will be turned down on December 6, 2019. See themigration guide for instructions on migrating to the REST API. | |
Public Method Summary
| abstractPendingResult<DrivePreferencesApi.FileUploadPreferencesResult> | getFileUploadPreferences(GoogleApiClient apiClient) This method isdeprecated. The Google Drive Android API is deprecated and will be turned down on December 6, 2019. See themigration guide for instructions on migrating to the REST API. |
| abstractPendingResult<Status> | setFileUploadPreferences(GoogleApiClient apiClient,FileUploadPreferences fileUploadPreferences) This method isdeprecated. The Google Drive Android API is deprecated and will be turned down on December 6, 2019. See themigration guide for instructions on migrating to the REST API. |
Public Methods
public abstractPendingResult<DrivePreferencesApi.FileUploadPreferencesResult>getFileUploadPreferences(GoogleApiClient apiClient)
This method isdeprecated.
The Google Drive Android API is deprecated and will be turned down on December 6, 2019. See themigration guide for instructions on migrating to the REST API.
Retrieves the file upload preferences for the file uploads performed by the calling application. These preferences control how the files that are created or edited by the calling application are uploaded to the server from the current device. If the calling application regularly uploads large files in the user's Drive, it is advisable to use these preferences to control when the files should be uploaded to the server (based on network connectivity or battery usage, etc.). SeeFileUploadPreferences for more details.
Parameters
| apiClient | TheGoogleApiClient to service the call. |
|---|
Returns
- A PendingResult which can be used to retrieve
FileUploadPreferences.
public abstractPendingResult<Status>setFileUploadPreferences(GoogleApiClient apiClient,FileUploadPreferences fileUploadPreferences)
This method isdeprecated.
The Google Drive Android API is deprecated and will be turned down on December 6, 2019. See themigration guide for instructions on migrating to the REST API.
Sets the file upload preferences for the file uploads performed by the calling application. These preferences control how the files that are created or edited by the calling application are uploaded to the server from the current device. If the calling application regularly uploads large files in the user's Drive, it is advisable to use these preferences to control when the files should be uploaded to the server (based on network connectivity or battery usage, etc.). SeeFileUploadPreferences for more details.
Note that the preferences will be applied to both future and pending file uploads performed by the application. For example, if the application sets the preferences to upload only on WiFi, and then uploads a file while the device is on mobile data, the file will not be uploaded at that point. However, if later on the application changes the preferences to upload on WiFi or mobile data, then the file becomes eligible to be uploaded.
Parameters
| apiClient | TheGoogleApiClient to service the call. The client must be connected before invoking this call. |
|---|---|
| fileUploadPreferences | The preferences to set for file upload operations. |
Returns
- A PendingResult which can be used to retrieve
FileUploadPreferences.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.