Reputation: 3986
I am making an application that makes calls to a url. The way to make calls is as follows:
//…
public String doInBackground(String... urls){
String url = urls[0];
try {
Log.i("base","Parsing");
// defaultHttpClient
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost(url);
HttpResponse httpResponse = httpClient.execute(httpPost);
HttpEntity httpEntity = httpResponse.getEntity();
xml = EntityUtils.toString(httpEntity);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return xml;
}
//...
new callingUrl().execute("http://www.myurl.com/directory/myxml.xml");
I am interested in knowing whether through the logs, or otherwise, can anyone see the URLs to which I call
If so, is there anyway to hide?
Thank you very much in advance
Regards
Upvotes: 0
Views: 155
Reputation: 6591
Any smart user can see it if they watch your http traffic by external means, unless you use SSL. Apart from that, unless you log it yourself or an exception gets thrown which happens to print the URL, I don't think it should be accessible through the logs. And also, from Android 4.1 onward, apps can't read logs.
I also question why you're hiding URLs. If you're a good guy, security through obscurity rarely works; and if you're hiding it for nefarious purposes, you are evil. :)
Upvotes: 1