Code example for AlertDialog

Methods: show

0
     * called to start authenticating using AccountManager. 
     * <p/> 
     * After a token is created, AccountManager will call the run() method. 
     */ 
    private void startAuthentication() { 
        mProgressbar.show();
 
        mAccountManager.getAuthToken(mAccount, mAuthToken, null, mActivity, this, null);
    } 
 
    /** 
     * called by IITC_Mobile when the authentication activity has finished. 
     */ 
    public void onActivityResult(int resultCode, Intent data) {
        if (resultCode == Activity.RESULT_OK)
            // authentication activity succeeded, request token again 
            startAuthentication(); 
        else 
            onLoginFailed(); 
    }