Code example for NetworkInfo

Methods: getDetailedState, isConnected