DrivePreferencesApi
Stay organized with collections
Save and categorize content based on your preferences.
This interface is deprecated.
The Google Drive Android API is deprecated and will be turned down on December 6, 2019.
See the migration 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
This interface is deprecated. The Google
Drive Android API is deprecated and will be turned down on December 6, 2019.
See the migration
guide
for instructions on migrating to the REST API.
Public Methods
This method isdeprecated.
The Google Drive Android API is deprecated and will be turned down on December 6,
2019. See the migration
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.). See FileUploadPreferences
for more details.
This method isdeprecated.
The Google Drive Android API is deprecated and will be turned down on December 6,
2019. See the migration
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.). See FileUploadPreferences
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
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eDrivePreferencesApi\u003c/code\u003e is deprecated and will be turned down on December 6, 2019.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers should migrate to the REST API, with instructions provided in the migration guide.\u003c/p\u003e\n"],["\u003cp\u003eThis API was used to manage Drive preferences for file uploads, such as network conditions for uploads.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egetFileUploadPreferences()\u003c/code\u003e and \u003ccode\u003esetFileUploadPreferences()\u003c/code\u003e methods, also deprecated, were used to retrieve and update these preferences.\u003c/p\u003e\n"]]],[],null,["# DrivePreferencesApi\n\npublic interface **DrivePreferencesApi** \n**This interface is deprecated.** \n\nThe Google Drive Android API is deprecated and will be turned down on December 6, 2019.\nSee the [migration guide](//developers.google.com/drive/android/deprecation) for\ninstructions on migrating to the REST API.\n\nThe entry point for retrieving and updating Drive preferences. The preferences set by\nthese APIs are applied only to the current user account and the calling application. \n\n### Nested Class Summary\n\n|-----------|---|---|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| interface | [DrivePreferencesApi.FileUploadPreferencesResult](/android/reference/com/google/android/gms/drive/DrivePreferencesApi.FileUploadPreferencesResult) || *This interface is deprecated. The Google Drive Android API is deprecated and will be turned down on December 6, 2019. See the [migration guide](//developers.google.com/drive/android/deprecation) for instructions on migrating to the REST API.* |\n\n### Public Method Summary\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult)\\\u003c[DrivePreferencesApi.FileUploadPreferencesResult](/android/reference/com/google/android/gms/drive/DrivePreferencesApi.FileUploadPreferencesResult)\\\u003e | [getFileUploadPreferences](/android/reference/com/google/android/gms/drive/DrivePreferencesApi#getFileUploadPreferences(com.google.android.gms.common.api.GoogleApiClient))([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) apiClient) *This method isdeprecated. The Google Drive Android API is deprecated and will be turned down on December 6, 2019. See the [migration guide](//developers.google.com/drive/android/deprecation) for instructions on migrating to the REST API.* |\n| abstract [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult)\\\u003c[Status](/android/reference/com/google/android/gms/common/api/Status)\\\u003e | [setFileUploadPreferences](/android/reference/com/google/android/gms/drive/DrivePreferencesApi#setFileUploadPreferences(com.google.android.gms.common.api.GoogleApiClient, com.google.android.gms.drive.FileUploadPreferences))([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) apiClient, [FileUploadPreferences](/android/reference/com/google/android/gms/drive/FileUploadPreferences) fileUploadPreferences) *This method isdeprecated. The Google Drive Android API is deprecated and will be turned down on December 6, 2019. See the [migration guide](//developers.google.com/drive/android/deprecation) for instructions on migrating to the REST API.* |\n\nPublic Methods\n--------------\n\n#### public abstract [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult)\\\u003c[DrivePreferencesApi.FileUploadPreferencesResult](/android/reference/com/google/android/gms/drive/DrivePreferencesApi.FileUploadPreferencesResult)\\\u003e\n**getFileUploadPreferences** ([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) apiClient)\n\n**This method isdeprecated.** \n\nThe Google Drive Android API is deprecated and will be turned down on December 6,\n2019. See the [migration\nguide](//developers.google.com/drive/android/deprecation) for instructions on migrating to the REST API. \nRetrieves the file upload preferences for the file uploads performed by the calling\napplication. These preferences control how the files that are created or edited by the\ncalling application are uploaded to the server from the current device. If the calling\napplication regularly uploads large files in the user's Drive, it is advisable to use\nthese preferences to control when the files should be uploaded to the server (based on\nnetwork connectivity or battery usage, etc.). See [FileUploadPreferences](/android/reference/com/google/android/gms/drive/FileUploadPreferences)\nfor more details. \n\n##### Parameters\n\n| apiClient | The [GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) to service the call. |\n|-----------|------------------------------------------------------------------------------------------------------------------|\n\n##### Returns\n\n- A PendingResult which can be used to retrieve [FileUploadPreferences](/android/reference/com/google/android/gms/drive/FileUploadPreferences). \n\n#### public abstract [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult)\\\u003c[Status](/android/reference/com/google/android/gms/common/api/Status)\\\u003e\n**setFileUploadPreferences** ([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) apiClient, [FileUploadPreferences](/android/reference/com/google/android/gms/drive/FileUploadPreferences) fileUploadPreferences)\n\n**This method isdeprecated.** \n\nThe Google Drive Android API is deprecated and will be turned down on December 6,\n2019. See the [migration\nguide](//developers.google.com/drive/android/deprecation) for instructions on migrating to the REST API. \nSets the file upload preferences for the file uploads performed by the calling\napplication. These preferences control how the files that are created or edited by the\ncalling application are uploaded to the server from the current device. If the calling\napplication regularly uploads large files in the user's Drive, it is advisable to use\nthese preferences to control when the files should be uploaded to the server (based on\nnetwork connectivity or battery usage, etc.). See [FileUploadPreferences](/android/reference/com/google/android/gms/drive/FileUploadPreferences)\nfor more details.\n\nNote that the preferences will be applied to both future and pending file uploads\nperformed by the application. For example, if the application sets the preferences to\nupload only on WiFi, and then uploads a file while the device is on mobile data, the\nfile will not be uploaded at that point. However, if later on the application changes\nthe preferences to upload on WiFi or mobile data, then the file becomes eligible to be\nuploaded. \n\n##### Parameters\n\n| apiClient | The [GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) to service the call. The client must be connected before invoking this call. |\n| fileUploadPreferences | The preferences to set for file upload operations. |\n|-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\n##### Returns\n\n- A PendingResult which can be used to retrieve [FileUploadPreferences](/android/reference/com/google/android/gms/drive/FileUploadPreferences)."]]