I am developing an Android application and working in Samsung J7. The problem is that when the application starts, the error message " (httplog) -static: issbsettingenabled false ) is displayed , is there a way to enable httplog true or an alternative way to solve this problem. If programmatically wants to enable it, how to do it
private void tryLogin(String log, String pass) {
HttpURLConnection connection;
OutputStreamWriter request = null;
URL url = null;
String response = null;
String parameters = "="+log+"&="+pass;
try
{
url = new URL("http://209.68.26.95/anglertechnologieseit/lc_webservice/webservice.php?Case=loginCheck");
connection = (HttpURLConnection) url.openConnection();
connection.setDoOutput(true);
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
connection.setRequestMethod("POST");
request = new OutputStreamWriter(connection.getOutputStream());
request.write(parameters);
request.flush();
request.close();
String line = "";
InputStreamReader isr = new InputStreamReader(connection.getInputStream());
BufferedReader reader = new BufferedReader(isr);
StringBuilder sb = new StringBuilder();
while ((line = reader.readLine()) != null)
{
sb.append(line + "\n");
}
stored in response variable.
response = sb.toString();
Toast.makeText(this,"Message from Server: \n"+ response, 0).show();
System.out.println("Message from Serverrrrrrrrrrrr :"+response);
isr.close();
reader.close();
}
catch(IOException e)
{
System.out.println("eeerrrrooorrr"+e);
}
}

source
share