@Override protected void onPostExecute(String result) { Log.d(TAG, "ID token: " + result); if (result != null) { // Successfully retrieved ID Token. save user info User.getCurrentUser().storeProfile(result); } else { // There was some error getting the ID Token // ... } }
private void showSignedInUI() { // set current user String accountName = Plus.AccountApi.getAccountName(mGoogleApiClient); Account account = new Account(accountName, GoogleAuthUtil.GOOGLE_ACCOUNT_TYPE); User.setCurrentUser(new User(account.name, account.name, "0", "0")); // Send Authentication Token to server and set current User new GetUserIDTask().execute(); setContentView(R.layout.activity_myrides); if (savedInstanceState == null) { activityFragment = new MyRidesFragment(); getSupportFragmentManager() .beginTransaction() .add(R.id.container, (activityFragment)) .commit(); } signedIn = true; invalidateOptionsMenu(); }