if (connection == null) {
      return Promise.resolve({
        type: "wifi",
        effectiveType: "3g"
      });
    }
See https://facebook.github.io/react-native/docs/netinfo.html#getconnectioninfo