Answer the question
In order to leave comments, you need to log in
How to display string from web by url in TextView?
There is a line available by url that the application needs to download it.
public String getTemperature(String urlsite)
{
String matchtemper = "";
try
{
// загрузка страницы
URL url = new URL(urlsite);
URLConnection conn = url.openConnection();
InputStreamReader rd = new InputStreamReader(conn.getInputStream());
matchtemper = rd.toString();
return matchtemper;
}
catch (Exception e)
{
e.printStackTrace();
}
return matchtemper;
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question