BlackBerry Dynamics infrastructure connection status. More...
This class represents the status of the connection from the application to the BlackBerry Dynamics infrastructure.
Every BlackBerry Dynamics application connects to the BlackBerry Dynamics infrastructure whenever possible. The connection is maintained by the BlackBerry Dynamics runtime instance that is embedded in the application. The infrastructure includes the BlackBerry Dynamics Network Operation Center (NOC) as well as a number of other components that can be installed by the enterprise. The current status can be obtained synchronously. It is also possible to receive notifications whenever the status changes.
To obtain the current status, call the GDConnectivityManager.getActiveNetworkInfo method.
To receive notifications, register a receiver class:
BroadcastReceiver
object.The following code snippets illustrate some common tasks.
The above snippet shows:
The above snippet shows:
Public Member Functions | |
boolean | isConnected () |
Basic connection status. More... | |
boolean | isAvailable () |
Connection availability. More... | |
boolean | isPushChannelAvailable () |
Push Channel availability. More... | |
boolean | isBlocked () |
Network block status. More... | |
boolean | isCaptivePortal () |
Is captive portal Detected. More... | |
boolean | isUnknownOutage () |
Is Unknown Outage. More... | |
String | getTypeName () |
Name of the type of network through which the application is connected. More... | |
int | getType () |
Numeric code for the type of network through which the application is connected. More... | |
boolean isConnected | ( | ) |
This method returns a similar value to android.net.NetworkInfo.isConnected() but for the connection to the BlackBerry Dynamics infrastructure.
true
if the application is connected to the BlackBerry Dynamics infrastructure. false
otherwise. boolean isAvailable | ( | ) |
This method returns a similar value to android.net.NetworkInfo.isAvailable() but for the connection to the BlackBerry Dynamics infrastructure.
true
if connection to the BlackBerry Dynamics infrastructure is available. false
otherwise. boolean isPushChannelAvailable | ( | ) |
Call this method to check that the BlackBerry Dynamics Push Channel service is available. For an overall description of how to use the service, see under PushChannel .
A change to the availability of the Push Channel service will trigger an infrastructure status change notification to the application. See the class description, above, for details of how to register for these notifications.
true
if the Push Channel service is available. false
otherwise. boolean isBlocked | ( | ) |
Call this method to check whether connection to the BlackBerry Dynamics infrastructure is blocked by a current device setting. The following settings are in scope of this method.
true
if connection to the infrastructure is blocked by a current device setting. false
otherwise.boolean isCaptivePortal | ( | ) |
Call this method to check that a captive portal has been detected with the current Wi-Fi connection.
This attribute will be updated once the DataConnectivityCheckTask completes.
true
if a captive portal was detected. false
otherwise. boolean isUnknownOutage | ( | ) |
Call this method to check if an unknown outage has been detected with the current Wi-Fi connection.
This attribute will be updated once the DataConnectivityCheckTask completes.
true
if an unknown outage was detected. false
otherwise. String getTypeName | ( | ) |
This method returns a similar value to android.net.NetworkInfo.getTypeName() but for the connection to the BlackBerry Dynamics infrastructure.
String
containing the name of the connected network type, for example "MOBILE"
or "WIFI"
, or null
if there is no connection. int getType | ( | ) |
This method returns a similar value to android.net.NetworkInfo.getType() but for the connection to the BlackBerry Dynamics infrastructure.
The TYPE_
values defined by the native android.net.ConnectivityManager class are used, for example:
ConnectivityManager.TYPE_MOBILE
for a mobile data (cellular) network.ConnectivityManager.TYPE_WIFI
for a Wi-Fi network.