There doesn’t seem to be a system.network property
What’s the best way to determine if a device has internet / network access?
There doesn’t seem to be a system.network property
What’s the best way to determine if a device has internet / network access?
I would use a URLConnection and send a HEAD request then check the result to determine if an Internet connection is available.
I’m doing a send in a try catch and I do get the error (sometimes) but others it’s raising an unhandled exception in the app class. Oddly it’s the same function that is sending in both cases, so I’m not sure why it’s behaving this way.