コード例 #1
0
 public void onEvent(LoginSuccessEvent login_success) {
   String oauth_token = login_success.getOauth_token();
   String username = login_success.getUsername();
   DBStore db = DBStore.getInstance((Activity) login_page);
   try {
     if (!db.userExistsInDB(username)) {
       db.insertUser(username);
       LibraryService.initializeDBWithLibraryEntries(db, username);
     }
   } catch (Exception e) {
     // STUB will handle later
   }
   login_page.loginSuccess(username, oauth_token);
 }
コード例 #2
0
 public void onEvent(LoginFailedEvent login_failed) {
   Log.e("login_failed", login_failed.getError());
   login_page.setAuthToken(login_failed.getError());
 }