Migrate from the Google Drive Android API | Google for Developers
- ️Thu Dec 19 2024
Get started
- Drive API overview
- Get started with Google Workspace
- Configure OAuth consent
Drive API
- Choose scopes
Manage files and folders
- Overview
- Create and manage files
- Upload file data
- Download and export files
- Manage file revisions
- Manage long-running operations
- Create and populate folders
- Trash or delete files and folders
- Search for files and folders
- Manage comments and replies
- Create a shortcut to a Drive file
- Create a shortcut file to app content
Drive Activity API
- Overview
- Data model
- Make requests
- Migrate from v1
Drive Labels API
- Overview
- Label lifecycle
- Set up scopes & admin access
- Compare v2beta & v2
- Create & publish a label
- Update a label
- Disable, enable & delete labels
- Search labels
Google Picker API
- Overview
- Code sample
Extend & automate
- Add-ons
- Apps Script
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:
- Share and collaborate as you expect from Drive. You can manage permissions or prompt the Share dialog to users as needed. The REST API also allows for commenting on files, allowing your app to interact with the conversation around a file.
- Search for files using
files.list
, based on traditional indexing or your own customized, indexable text. - Detect changes to files through the Changes collection and to any shared with the user through shared drives.
- Export and convert Google Docs so that your app can easily open a user’s document.
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."]]],[]]