You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+21-17
Original file line number
Diff line number
Diff line change
@@ -153,6 +153,10 @@ To use this library you need to ensure you are using the correct version of Reac
153
153
|`2.x.x`|`>= 0.57`|
154
154
|`1.x.x`|`>= 0.57`|
155
155
156
+
## Browser Compatilibity
157
+
The web implementation heavily depends on the [Network Information API](https://developer.mozilla.org/en-US/docs/Web/API/Network_Information_API) which is still an is an experimental technology and thus it's not supported in every browser.
158
+
If this API is not available the library will safely fallback to the old [onLine](https://developer.mozilla.org/en-US/docs/Web/API/NavigatorOnLine/onLine) property and return basic connection information.
159
+
156
160
## Migrating from the core `react-native` module
157
161
This module was created when the NetInfo was split out from the core of React Native. To migrate to this module you need to follow the installation instructions above and then change you imports from:
158
162
@@ -232,7 +236,7 @@ The `details` value depends on the `type` value.
|`isConnectionExpensive`| Android, iOS, Windows |`boolean`| If the network connection is considered "expensive". This could be in either energy or monetary terms. |
239
+
|`isConnectionExpensive`| Android, iOS, Windows, Web|`boolean`| If the network connection is considered "expensive". This could be in either energy or monetary terms. |
236
240
|`ssid`| Android, iOS (not tvOS) |`string`| The SSID of the network. May not be present, `null`, or an empty string if it cannot be determined. **On iOS, make sure your app meets at least one of the [following requirements](https://developer.apple.com/documentation/systemconfiguration/1614126-cncopycurrentnetworkinfo?language=objc#discussion). On Android, you need to have the `ACCESS_FINE_LOCATION` permission in your `AndroidManifest.xml` and accepted by the user**. |
237
241
|`strength`| Android |`number`| An integer number from `0` to `5` for the signal strength. May not be present if the signal strength cannot be determined. |
238
242
|`ipAddress`| Android, iOS |`string`| The external IP address. Can be in IPv4 or IPv6 format. May not be present if it cannot be determined. |
@@ -242,11 +246,11 @@ The `details` value depends on the `type` value.
|`isConnectionExpensive`| Android, iOS, Windows |`boolean`| If the network connection is considered "expensive". This could be in either energy or monetary terms. |
248
-
|`cellularGeneration`| Android, iOS, Windows |[`NetInfoCellularGeneration`](#netinfocellulargeneration)| The generation of the cell network the user is connected to. This can give an indication of speed, but no guarantees. |
249
-
|`carrier`| Android, iOS |`string`| The network carrier name. May not be present or may be empty if none can be determined. |
|`isConnectionExpensive`| Android, iOS, Windows, Web|`boolean`| If the network connection is considered "expensive". This could be in either energy or monetary terms. |
252
+
|`cellularGeneration`| Android, iOS, Windows |[`NetInfoCellularGeneration`](#netinfocellulargeneration)| The generation of the cell network the user is connected to. This can give an indication of speed, but no guarantees. |
253
+
|`carrier`| Android, iOS |`string`| The network carrier name. May not be present or may be empty if none can be determined. |
250
254
251
255
##### `type` is `bluetooth`, `ethernet`, `wimax`, `vpn`, or `other`
252
256
@@ -259,17 +263,17 @@ The `details` value depends on the `type` value.
259
263
#### `NetInfoStateType`
260
264
Describes the current type of network connection. It is an enum with these possible values:
0 commit comments