shridhar choudhari
shridhar choudhari

Reputation: 1

Refresh activity if Internet connection established in between task is running

I am getting data from the server using retrofit and showing it on the fragmented screen. But when the internet is not there no data will be available. When I on the net connection will app is on, data is not loading as the activity is not refreshing. So I'm thinking of refreshing page by pull down. If u have a better idea, you are well come to share.

Upvotes: 0

Views: 125

Answers (1)

Unaisul Hadi
Unaisul Hadi

Reputation: 678

You have to use BroadcastReciever class for detecting Network changes.

You may get a solution here: Network listener Android

Upvotes: 1

Related Questions