URL から XML を取得し、そこからデータを電話で表示する方法を確認するためのチュートリアルのあるページを見ていましたが、http 接続しか見つかりませんでした。
URL からデータを取得する必要がありますが、http を使用してサーバーに接続できません https を使用する必要があります
try {
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost("https:...");
HttpResponse httpResponse = httpClient.execute(httpPost);
HttpEntity httpEntity = httpResponse.getEntity();
line = EntityUtils.toString(httpEntity);
line = con.getResponseMessage();
//con.getResponseMessage();
} catch (UnsupportedEncodingException e) {
line = "<results status=\"error\"><msg>Can't connect to server</msg></results>";
} catch (MalformedURLException e) {
line = "<results status=\"error\"><msg>Can't connect to server</msg></results>";
} catch (IOException e) {
line = "<results status=\"error\"><msg>Can't connect to server</msg></results>";
}
このフラグメントを https を使用するように変更するにはどうすればよいですか? https から xml を取得するチュートリアルはありますか?