X
X
xne712472015-04-06 13:10:45
Android
xne71247, 2015-04-06 13:10:45

How to handle internet state in android app?

I made a splash screen in the application. In this activity, I go to the internet to get information from 30 pages and download 30 small pictures. I understand that you need to process the availability of the Internet before downloading data and check in time, because. I tried to test the situation on a real tablet, when I launched the application with the wifi router turned off, the splashscreen auto just hung, as it were, and also already during the data download, approximately in the middle I turned off the router and also the application stopped and I understand that it was waiting for the connection . Tell me, please, how do normal, experienced people do it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
Oleg Gamega, 2015-04-06
@gadfi

No need to download, load asynchronously ─ for this I use picasso, you can use imageloader or something else, including self-written

X
xmoonlight, 2015-04-06
@xmoonlight

try catch

M
Marat S, 2015-04-06
@aratj

already written above, in any case, you will most likely have an error.
and why immediately drag data from 30 pages, you can’t do it at the request of the user,
well, pull refresh , or something else?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question