googleworkspace / android-samples

Android samples for Google Workspace APIs
Apache License 2.0
636 stars 410 forks source link

Question: Google Drive API behavior post shut down #116

Closed robsmall closed 5 years ago

robsmall commented 5 years ago

As per Google's Documentation:

The Drive Android API is shut down and all connection attempts will be refused.

Since the Google API Client using the Drive Android API performs all connection attempts to Google, and since there will inevitably be users on older versions of our application, we are curious what the user experience will be like for users with older versions of our app that still try to communicate with the Google Drive Android APIs

For example, will they get a native dialog from Google, will the API throw exceptions that will cause the app to crash, or will something else happen?

The reason we are asking is because we want to prepare our support team for when the time comes. The app in question here is Duo Mobile as I am a Duo Security employee.

rbstarbuck commented 5 years ago

The API will refuse any connection attempt. When this happens depends on whether the app is using the old GoogleApiClient model, where the Drive API is requested and a connect() call is made, or in the newer connectionless client model, where connections happen in the background when the API is first accessed. In both cases any attached onFailure listeners will be invoked (for the former this happens on the connect() call, for the latter on any Drive API call).

Additionally, a dialog will be invoked by Google Play Services indicating that an API was requested which is not available and to contact the developer for assistance.

robsmall commented 5 years ago

@rbstarbuck thanks for the response and information!

We are using the older GoogleApiClient model where we call connect.

We have a bit of a concern since we have seen an issue where connection failures get into an infinite loop when calling either result.startResolutionForResult() or GoogleApiAvailability.getInstance().getErrorDialog() (I can't remember which code path it hits off hand) in onConnectionFailed(). This happens specifically when users change their password for the Google Account that is used on a different device. This happens in both the newer and older method IIRC, but I haven't tested both in a while. I should file a bug report for this elsewhere probably...

rbstarbuck commented 5 years ago

Because Duo is one of the bigger customers for Drive Android API, I'd be happy to check how the deprecation will affect older clients for users with outdated versions. Feel free to DM me if you're comfortable with sharing an outdated APK you'd like a QA test on.

robsmall commented 5 years ago

Thanks! I won't be able to share our application code, but I'll reach out via email and we can figure something out. I can likely spin up a sample app similar to what we have in production or something of the sort for testing.