When request google drive permission scope, DriveScopes.DRIVE_FILE
only return files created/opened by the app. To return all files, use DriveScopes.DRIVE
, DriveScopes.DRIVE_READONLY
or DriveScopes.DRIVE_METADATA_READONLY
private fun buildGoogleSignInClient(): GoogleSignInClient { val signInOptions = GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) // .requestScopes(Scope(DriveScopes.DRIVE_FILE)) .requestScopes(Scope(DriveScopes.DRIVE)) // .requestScopes(Scope(DriveScopes.DRIVE_METADATA_READONLY)) .build() return GoogleSignIn.getClient(this, signInOptions)}
References: