When you open a file in drive Android API local syncing happens.
The DriveFile.open method retrieves the locally synced file resource
and opens it. If the file is not synced with the local storage, it
retrieves the file from the Drive service and returns a DriveContents
resource. For example:
DriveFile file = ... file.open(mGoogleApiClient,
DriveFile.MODE_READ_ONLY, null)
.setResultCallback(contentsOpenedCallback);
A DriveContents resource contains a temporary copy of the file's
binary stream which is only available to your application. If multiple
applications are accessing the same file, there are no race conditions
between DriveContents resources. In this situation, the last write
operation will be the final state of the content.
Handling the response requires you to check if the call was successful
or not. If the call was successful, you can retrieve the DriveContents
resource. This resource contains methods to retrieve an InputStream or
ParcelFileDescriptor to read the file's binary contents