@Override protected String doInBackground(Void... params) { String url = "profile/UpdateFollowMeAddress"; try { JSONObject jobj = new JSONObject(); jobj.put("ProfileId", profileid); JSONObject address = new JSONObject(); address.put("AdminLevel1", adlevel1); address.put("AdminLevel2", adlevel2); address.put("Country", country); address.put("CountryCode", countryId); address.put("Lat", String.valueOf(latitude)); address.put("Lng", String.valueOf(longitude)); address.put("StreetAddress", streetadd); address.put("Locality", locality); address.put("PostalCode", postalcode); jobj.put("Address", address); String response = CommonFunctionMapid.postJsonResponse(url, jobj.toString(), getBaseContext()); Log.e("TAG", "Response..." + response); JSONObject responseget = new JSONObject(response); JSONObject statusobj = responseget.getJSONObject("Status"); Success = statusobj.getString("Success"); message = statusobj.getString("Message"); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); CommonFunctionMapid.displayToastshort( getApplicationContext(), e.getMessage(), Gravity.CENTER); } return null; }