android - Jsoup SocketTimeOutException on Marshmallow devices while working on Nougat -


i have strange problem jsoup. small pages works fine devices while trying relatively big pages works on nougat , fails on others.

here code:

@override     protected list<gallery> doinbackground(string... url) {         try {             list<gallery> result = new arraylist<gallery>();             gallery gallery;             connection.response response = jsoup.connect(url[0])                     .useragent("mozilla/5.0 (windows nt 10.0; wow64; rv:55.0) gecko/20100101 firefox/55.0")                     .referrer("http://www.google.com")                     .followredirects(true)                     .timeout(0)                     .maxbodysize(0)                     .execute();         }      } 

any or suggestions appreciated.

edit: don't think page size problem. total size of page 89570 bytes. have tried 3 devices nougat , 4 devices marshmallow , situation persists. don't understand reason of down votes!

edit2: used okhttp3 , resolves problem. so, think there problem in jsoup library. code follows case still open!

            okhttpclient client = new okhttpclient();             request request = new request.builder()                     .url(url[0])                     .build();             response response = client.newcall(request).execute();             string body = response.body().string();             document doc = jsoup.parse(body, url[0]); 


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -