so this is for a project im doing for my school in which we need a backend. our current setup is that the foreground is an android app, whereas the backend is a mySQL database that is located within my school's servers. The android app is supposed to interact with the mySQL database using a php script.
my php script is set currently hardcoded to return one single row from the mySQL database in JSON format.
my android code is as follows:
public static final String KEY = "URL of my PHP script";
InputStream is = null;
String result = "";
try{
HttpClient httpclient = new DefaultHttpClient();
HttpGet request = new HttpGet();
request.setURI(new URI(KEY));
Log.d(null,"there");
HttpResponse response = httpclient.execute(request);
Log.d(null, "here");
HttpEntity entity = response.getEntity();
is = entity.getContent();
}catch(Exception e){
Log.e("log_tag", "Error in http connection "+e.toString());
}
However, I get an exception at the line
HttpResponse response = httpclient.execute(request);
in which the error says: No Peer Certificate.
Anyone know what's wrong with it, and how to fix it?