Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class HeadAuth extends AsyncTask<String, Void, String> {
- private Exception exception;
- @Override
- protected String doInBackground(String... strings) {
- try {
- ExtractedMethod exm = new ExtractedMethod();
- //取得server回傳stastus code
- final int responseString = exm.run(HTCode.Code.HEAD, 1, conn_adv, true, "", -1, false).getHTCode();
- //call resultCodeAuth
- resultCodeAuth(responseString);
- //debug用
- runOnUiThread(new Runnable() {
- public void run() {
- Toast.makeText(MainActivity.this, "HEAD status: " + responseString, Toast.LENGTH_SHORT).show();
- }
- });
- } catch (final Exception io) {
- runOnUiThread(new Runnable() {
- public void run() {
- Toast.makeText(MainActivity.this, "HEAD exception: " + io,Toast.LENGTH_SHORT).show();
- }
- });
- }
- return "EXCEPTION";
- }
- }
- public void resultCodeAuth( int resultHTCode) {
- //confrim user's account info
- }
Advertisement
Add Comment
Please, Sign In to add comment