package com.quickblox.sample.user.activities;

import android.os.Bundle;
import android.view.View;

import com.quickblox.auth.QBAuth;
import com.quickblox.auth.model.QBSession;
import com.quickblox.core.QBEntityCallback;
import com.quickblox.core.exception.QBResponseException;
import com.quickblox.sample.core.ui.activity.CoreSplashActivity;
import com.quickblox.sample.user.R;

public class SplashActivity extends CoreSplashActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        createSession();
    }

    @Override
    protected String getAppName() {
        return getString(R.string.splash_app_title);
    }

    @Override
    protected void proceedToTheNextActivity() {
        UsersListActivity.start(this);
        finish();
    }

    private void createSession() {
        QBAuth.createSession().performAsync(new QBEntityCallback<QBSession>() {
            @Override
            public void onSuccess(QBSession qbSession, Bundle bundle) {
                proceedToTheNextActivity();
            }

            @Override
            public void onError(QBResponseException e) {
                showSnackbarError(null, R.string.errors, e, new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        createSession();
                    }
                });
            }
        });
    }
}
@@ -70,212 +70,8 @@
 le;%0A
-import android.view.View;%0A%0Aimport com.quickblox.auth.QBAuth;%0Aimport com.quickblox.auth.model.QBSession;%0Aimport com.quickblox.core.QBEntityCallback;%0Aimport com.quickblox.core.exception.QBResponseException;
 %0Aimp
@@ -347,37 +347,57 @@
 );%0A%0A        
-createSession
+proceedToTheNextActivityWithDelay
 ();%0A    %7D%0A%0A 
@@ -633,638 +633,6 @@
    %7D
-%0A%0A    private void createSession() %7B%0A        QBAuth.createSession().performAsync(new QBEntityCallback%3CQBSession%3E() %7B%0A            @Override%0A            public void onSuccess(QBSession qbSession, Bundle bundle) %7B%0A                proceedToTheNextActivity();%0A            %7D%0A%0A            @Override%0A            public void onError(QBResponseException e) %7B%0A                showSnackbarError(null, R.string.errors, e, new View.OnClickListener() %7B%0A                    @Override%0A                    public void onClick(View v) %7B%0A                        createSession();%0A                    %7D%0A                %7D);%0A            %7D%0A        %7D);%0A    %7D
 %0A%7D

update users sample