The Connection object gives access to the device's cellular and wifi connection information.
Configuration Document Settings
To use all of the API described for this object, you must ensure the following settings are in your configuration document:
You must declare the feature element(s) below in your configuration document:
|<feature id="blackberry.connection" />||Y|
|Permission Elements (PlayBook and BlackBerry 10+)|
|This API does not require a <permission> element to be declared in the configuration document of your BlackBerry WebWorks Application.|
This event is fired by the system. If you want to listen to the event you can do so using the blackberry.event.addEventListener function and remove the listener using the blackberry.event.removeEventListener function.
The connectionchange event is triggered whenever the network connection type changes.
|- BlackBerry 10|
The callback function that will be invoked on the connectionchange event.
info: An object with the pertinent information.
info.oldType: The network connection type prior to the event.
info.newType: The new network connection type.