0
Ich war HttpClient, um einen Webservice zu treffen und dann JSON-Antwort zu behandeln, aber jetzt ist es veraltet dann, wie Sie httpUrlConnection verwenden, um JSON Antwort von Webservice zu behandeln.Handle JSON Antwort von Webservice mit httpurlconnection
HttpClient httpClient = new DefaultHttpClient();
String authenticationURL = "http://192.168.100.27:8080/NotificationWebService/saveDeviceID?userName="+username+"&deviceId="+regId+"&idType=ANDROID&callBack=jsonCallback";
Log.d("RegisterActivity", "URL "
+ authenticationURL);
HttpGet authenticationGetRequest = new HttpGet(authenticationURL);
HttpResponse authenticationResponse = httpClient.execute(authenticationGetRequest);
Log.d("RegisterActivity", "registerInBackground - regId: "
+ authenticationResponse);