이 웹 사이트에서 가져온 여러 링크를 어떻게 반환합니까? 루프 밖에서 얻은 수익은 효과가없는 것 같습니다.doInBackground에서 여러 값 반환
public class jsoupexample extends AsyncTask<String,Integer,String>{
@Override
protected String doInBackground(String... html) {
try {
doc = Jsoup.connect(html[0]).get();
} catch (IOException e) {
e.printStackTrace();
}
Elements link = doc.select("a[href]");
for(Element links : link) {
audi=links.attr("abs:href");
}
return audi;
}
@Override
protected void onPostExecute(String result) {
super.onPostExecute(result);
tv2.setText(result);
}
}
나는 이것을 시도 할 것이다! thnxx! –