As stated in the title, why can't I see System.out.println
output inthe LogCat? This is my code which doesn't work. I use Android Studio (v.0.8.2).
EDIT: add log.i to code don't return nothing in logcat.
Here is my logcat
And here is my code
private static final String TAG = "MyActivity";
/*
*/
public void mButton(View view) {
URLConnection nbpUrl;
String data = "";
try {
nbpUrl = new URL("http://www.nbp.pl/Kursy/xml/dir.txt").openConnection();
InputStream is = nbpUrl.getInputStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
String inputLine;
while ((inputLine = reader.readLine()) != null) {
if (inputLine.startsWith("a") && inputLine.endsWith("140807")) {
System.out.println(inputLine);
data = inputLine;
Log.i(TAG, "test");
}
}
is.close();
}
catch(Exception e){
e.printStackTrace();
}
poleTextowe = (TextView)findViewById(R.id.pole1);
poleTextowe.setText(data);
}