List of usage examples for com.google.api.client.googleapis.extensions.android.gms.auth GoogleAccountCredential getSelectedAccount
public final Account getSelectedAccount()
From source file:com.google.drive.appdatapreferences.AppdataPreferencesSyncer.java
License:Open Source License
/** * Sets the credential and starts a periodic sync for the * selected account./* w w w .ja va2s. c o m*/ * @param credential User's credential */ public void setCredential(GoogleAccountCredential credential) { mCredential = credential; mSyncManager = new AppdataPreferencesSyncManager(credential.getSelectedAccount()); mSyncManager.startPeriodicSync(); }