@Override protected LinkedList<String> doInBackground(String... params) { LinkedList<String> response = new LinkedList<String>(); try { Log.d(TAG, "selfId is " + params[0]); String postContent = "target_id=" + URLEncoder.encode(params[0], "UTF-8"); response = ChessConnectionAdapter.getPhpPostResponse(VIEW_CHALLENGES_SCRIPT, postContent); } catch (UnsupportedEncodingException e) { Log.e(TAG, e.getMessage()); } return response; }
@Override protected LinkedList<String> doInBackground(String... params) { LinkedList<String> response = new LinkedList<String>(); try { String postContent = "challenge_id=" + URLEncoder.encode(params[0], "UTF-8") + "&status=" + URLEncoder.encode(params[1], "UTF-8") + "&opponent_id=" + URLEncoder.encode(params[2], "UTF-8"); response = ChessConnectionAdapter.getPhpPostResponse(ANSWER_CHALLENGE_SCRIPT, postContent); } catch (UnsupportedEncodingException e) { Log.e(TAG, e.getMessage()); } return response; }