Note: You are on the beta version of our docs. This is a work in progress and may contain broken links and pages.
Namespaces
Connectivity
Summary
Enumerations
Functions
getConnectionType
defined in @nativescript/core/connectivity/index.d.ts:6
Gets the type of connection.
Returns a value from the connectivity.connectionType enumeration.
To use this method on Android you need to have the android.permission.ACCESS_NETWORK_STATE permission added to the AndroidManifest.xml file.
Returns number
startMonitoring
Starts monitoring the connection type.
Parameter | Default | Description |
connectionTypeChangedCallback |
| (newConnectionType: number) => void A function that will be called when the connection type changes. |
Returns void
stopMonitoring
Stops monitoring the connection type.
Returns void