I try to update my DDNS (No-IP) in a android client.
I make a request to the following URL.(Discription)
http://username:password@dynupdate.no-ip.com/nic/update?hostname=mytest.testdomain.com&myip=1.2.3.4
When i am using my webbrowser, everything works fine.
"good [ip-address]"
But my android client only gets the response "nochange"
URL url = new URL("http://" + USERNAME + ":" + PASSWORD + "@dynupdate.no-ip.com/nic/update?hostname=" + HOSTNAME + "&myip=" + IP_ADDRESS);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
int i = conn.getResponseCode();
stringBuilder = new StringBuilder();
bufferedReader = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));String line;
while ((line = bufferedReader.readLine()) != null) {
stringBuilder.append(line + "\n");
}