developers.google.com

Migrate from the Google Drive Android API  |  Google for Developers

  • ️Thu Dec 19 2024
Skip to main content

Migrate from the Google Drive Android API

Stay organized with collections Save and categorize content based on your preferences.

The Drive Android API is deprecated as of December 6, 2018 and will be fully turned down on February 1, 2023.

Timeline

Date Drive Android API status
December 6, 2018 Deprecation is publicly announced. Existing clients will be able to access the API normally, but should immediately commence with migration efforts. New clients must not use the API.
October 21, 2019 The Drive Android API is removed from the Google Play Services SDK distribution. Apps will be unable to build until removing the Drive Android API dependency, but existing builds will be unaffected. The Drive Android API public documentation will no longer be available.
March 3, 2022 The Drive Android API is deprecated and all API calls are non-operational. Clients must migrate by this date.
February 1, 2023 The Drive Android API will be fully turned down and all connection attempts will be unsuccessful.

Use the Drive REST API

The Drive REST API offers the same functionality as the Drive Android API, including ways to:

To ease client migration efforts, a sample app is provided which demonstrates each of the proposed replacements above. It also shows how to create, modify, and query for a user's Drive files using the REST API. If you have any issues, check out the google-drive-api tag on StackOverflow.

Migration

Since the Drive Android API is deprecated, and all API calls are non-operational, make sure your app is no longer calling the API. To do this, remove the code that initializes the API: addApi(Drive.API).

If you don't migrate from the Drive Android API, and your app attempts to call the API, the following error message is returned:

com.google.android.gms.common.api.ApiException: 17: API: Drive.API is not available on this device. Connection failed with: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}

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-12-19 UTC.

Need to tell us more? [[["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-12-19 UTC."],[[["The Drive Android API is deprecated and will be fully turned down on February 1, 2023; developers should migrate to the Drive REST API."],["Existing apps using the Drive Android API will stop functioning as of March 3, 2022, when all API calls became non-operational."],["The Drive REST API provides equivalent functionality, including sharing, searching, change detection, and document export/conversion."],["Developers can find resources for migration, including a sample app and support on Stack Overflow, to facilitate a smooth transition."],["To avoid errors, remove the Drive Android API initialization code (`addApi(Drive.API)`) from your app."]]],[]]