Advertisement
Guest User

Untitled

a guest
Aug 1st, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. mApp.setListener(new OAuthAuthenticationListener() {
  2.  
  3. @Override
  4. public void onSuccess() {
  5.  
  6. // tvSummary.setText("Connected as " + mApp.getUserName());
  7.  
  8. String username = "hi";
  9. String password = "hi";
  10. String type = "register";
  11. BackgroundWorker backgroundWorker = new BackgroundWorker(getApplicationContext());
  12. backgroundWorker.execute(type, username, password);
  13. btnConnect.setText("Disconnect");
  14. llAfterLoginView.setVisibility(View.VISIBLE);
  15. // userInfoHashmap = mApp.
  16. mApp.fetchUserName(handler);
  17.  
  18. }
  19. /*public void OnLogin() {
  20.  
  21.  
  22. }*/
  23.  
  24. @Override
  25. public void onFail(String error) {
  26. Toast.makeText(MainActivity.this, error, Toast.LENGTH_SHORT)
  27. .show();
  28. }
  29.  
  30. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement