Guest User

Untitled

a guest
Jul 21st, 2015
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. class HeadAuth extends AsyncTask<String, Void, String> {
  2. private Exception exception;
  3.  
  4. @Override
  5. protected String doInBackground(String... strings) {
  6. try {
  7. ExtractedMethod exm = new ExtractedMethod();
  8.  
  9. //取得server回傳stastus code
  10. final int responseString = exm.run(HTCode.Code.HEAD, 1, conn_adv, true, "", -1, false).getHTCode();
  11.  
  12. //call resultCodeAuth
  13. resultCodeAuth(responseString);
  14.  
  15. //debug用
  16. runOnUiThread(new Runnable() {
  17. public void run() {
  18. Toast.makeText(MainActivity.this, "HEAD status: " + responseString, Toast.LENGTH_SHORT).show();
  19. }
  20. });
  21. } catch (final Exception io) {
  22. runOnUiThread(new Runnable() {
  23. public void run() {
  24. Toast.makeText(MainActivity.this, "HEAD exception: " + io,Toast.LENGTH_SHORT).show();
  25. }
  26. });
  27. }
  28. return "EXCEPTION";
  29. }
  30. }
  31.  
  32.  
  33. public void resultCodeAuth( int resultHTCode) {
  34. //confrim user's account info
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment