umts / pvta-multiplatform

Transit realtime app for mobile devices
Other
6 stars 5 forks source link

Incorrect network detection #348

Open werebus opened 7 years ago

werebus commented 7 years ago

Ran into this, this evening:

screenshot_20170331-201303

Note the full wifi and cellular signal. I also confirmed that I could access the web with Chrome. Killing and restarting the app fixed it, but I couldn't get it to check again otherwise.

akaplo commented 7 years ago

Interesting. Not sure why that happened.

werebus commented 7 years ago

I think this may be another backgrounding issue. I'm not 100% sure, but I think I opened the app somewhere where I didn't have a network connection, but the app wasn't in the foreground when the network came back again. ❓

akaplo commented 7 years ago

Can't reproduce on my 5X; we'll talk in person.

akaplo commented 7 years ago

One thing we can both reproduce is backgrounding the app, toggling internet off/on a few times, and reopening the app. Upon doing so, the "no interwebs" Toast will pop in and out as many times as the phone lost connection.

Will fix by adding a global "pause/resume" listener to stop the global "no internet?" listener.

akaplo commented 7 years ago

Think I finally managed to reproduce @werebus original bug. If a network change occurrs WHILE the app is loading, it might simply never think you have Internet.