I am performing login task and getting data from PHP server in json format. In response, I am getting a 'success' tag that containing User-ID
like this {"message":"You have been successfully login","success":"75"}
I get that value as "uid" in the same activity and move to next page. Now in next page, I want to check user profile. For that, I have to pass that "uid" as 'params' with url and get value from server. But don't understand how to do that.
In next activity page I am creating asyncTask to perform action.
protected String doInBackground(String... args) { // Building Parameters List<NameValuePair> params = new ArrayList<NameValuePair>(); // getting JSON string from URL JSONObject json = jsonParser.makeHttpRequest(PROFILE_URL, "GET",params); // Check your log cat for JSON reponse Log.d("Profile JSON: ", json.toString()); try { // profile json object profile = json.getJSONObject(TAG_PROFILE); } catch (JSONException e) { e.printStackTrace(); } return null; } Now I have to set the 'uid' in the place of params.