Sync Google Drive files to apps using the Drive REST API, bidding farewell to the Drive Android API
If you’re looking to make Google Drive files accessible from within your application, chances are you might use the Google Drive REST API or the Google Drive Android API to help. Both tools allow users to download or upload files from Drive from inside of another application.
Starting today, we’re simplifying options for developers by retiring the Drive Android API. We will focus solely on expanding functionality for the Drive REST API.
If you’re new to the Drive REST API, it offers all of 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.
- Also detect changes to files through the Changes collection, and keep track of file changes, including files from Team Drives that have been shared with the user.
- Export and convert Google Docs so that your app can open a user’s document easily.
If you use the Google Drive Android API, you will need to migrate your existing applications to other services prior to December 6, 2019, when all calls to the API and any features in your applications that depend on it will be shut down. Note: if you’ve been using the Drive Android API for its offline sync capability, you can continue to provide an offline-first model by using a SyncAdapter with the Drive REST API.
What to do if you currently use the Google Drive Android API
We want to make it easy for you to migrate your applications to use the Drive REST API. To get started, reference this migration guide which details replacements for each of the major services fulfilled by the Drive Android API. Additionally, check out this sample app, which demonstrates each of these proposed replacements. If you have any issues, check out the google-drive-sdk tag on StackOverflow.