Пример #1
0
 private void switchAccounts() {
   mOldSession = mSession;
   mSession = new BoxSession(this, null);
   mSession.setSessionAuthListener(this);
   mSession
       .authenticate()
       .addOnCompletedListener(
           new BoxFutureTask.OnCompletedListener<BoxSession>() {
             @Override
             public void onCompleted(BoxResponse<BoxSession> response) {
               if (response.isSuccess()) {
                 clearAdapter();
                 onAuthCreated(mSession.getAuthInfo());
               }
             }
           });
 }
Пример #2
0
 private void initialize() {
   mAdapter.clear();
   mSession = new BoxSession(this);
   mSession.setSessionAuthListener(this);
   mSession.authenticate();
 }