public static GoogleAccountCredential usingOAuth2 ( Context context , Collection < String > scopes ) { Preconditions . checkArgument ( scopes != null && scopes . iterator ( ) . hasNext ( ) ) ; String scopesStr = "oauth2: " + Joiner . on ( ' ' ) . join ( scopes ) ; return new GoogleAccountCredential ( context , scopesStr ) ; }
Constructs a new instance using OAuth 2 . 0 scopes .