Code example for NetworkInfo

Methods: getState, getType