hasNetworkConnection

Check if the device is connected to the internet Sample usage

if(context.hasNetworkConnection()) {
// do something
}

Return

true if connected, false otherwise