Enforce Drive Api For Android To Work Online Mode Only
Recently, I just manage to migrate Drive API related code from Google APIs Client Library for Java to Google Play services client library The following code is search a file in app
Solution 1:
There's no way to force a failure as you ask.
What you can do is request a sync with the server before your query: https://developers.google.com/android/reference/com/google/android/gms/drive/DriveApi.html#requestSync(com.google.android.gms.common.api.GoogleApiClient)
If there's no connection, the sync will fail with a network error.
Post a Comment for "Enforce Drive Api For Android To Work Online Mode Only"