Search in sources :

Example 1 with CredentialView

use of io.divide.client.android.CredentialView in project divide by HiddenStage.

the class DebugAuthActivity method onCreate.

/**
     * Called when the activity is first created.
     */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    String title = this.getIntent().getStringExtra(TITLE_EXTRA);
    if (title == null)
        title = getApplicationName(this);
    CredentialView credentialView = new CredentialView(this, title);
    DivideDrawer.attach(this, credentialView);
    BackendServices.addLoginListener(new LoginListener() {

        @Override
        public void onNext(BackendUser backendUser) {
            if (backendUser != null) {
                DebugAuthActivity.this.finish();
            }
        }
    });
    this.closeOptionsMenu();
}
Also used : LoginListener(io.divide.client.auth.LoginListener) CredentialView(io.divide.client.android.CredentialView) BackendUser(io.divide.client.BackendUser)

Aggregations

BackendUser (io.divide.client.BackendUser)1 CredentialView (io.divide.client.android.CredentialView)1 LoginListener (io.divide.client.auth.LoginListener)1