0

I simply implemented JSoup and it loads more then 5 seconds because the site is slow. Android gives an Error that the App is not responding. Jsoup returns the results after that anyway. Is there a way to get rid of that error?

Document dc = null;
try {
    dc = Jsoup.connect("https://example.com").timeout(5000).get();

} catch (IOException e) {
    e.printStackTrace();
}
  • 1
    This related [example](https://stackoverflow.com/q/73528613/230513) loads in the background using a JavaFX `Service`; something similar should be available in [tag:android]. – trashgod Nov 13 '22 at 17:57

0 Answers0