BlackBerry Dynamics infrastructure connection status. More...
#import <GDReachability.h>
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.
NSNotificationCenter
programming interface, with the following parameters.
[GD
Mac sharedInstance]
.The following code snippets illustrate some common tasks.
- (void)addChangeConnectionStatusObserver { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reachabilityChanged:) name:GDReachabilityChangedNotification object:[GDMac sharedInstance]]; } - (void)reachabilityChanged:(NSNotification *)notification { GDReachability *reachability = [GDReachability sharedInstance]; NSAlert* alert = [NSAlert new]; if (reachability.isNetworkAvailable) { [alert setMessageText:@"Success"]; [alert setInformativeText:@"Network Available"]; } else { [alert setMessageText:@"Error"]; [alert setInformativeText:@"Network NOT Available"]; } [alert addButtonWithTitle:@"OK"]; [alert beginSheetModalForWindow:self.view.window completionHandler:NULL]; }
+ (instancetype) sharedInstance |
This function returns a reference to the BlackBerry Dynamics infrastructure connection status object, which is a "singleton class".
status
property. - (BOOL) isNetworkAvailable [read, assign] |
The value of this property represents the availability of the connection to the BlackBerry Dynamics infrastructure.
A change to the availability of the connection will trigger an infrastructure status change notification to the application. See the class description, above, for details of how to register for these notifications. In addition, key-value observing (KVO) can be applied to this property.
- (BOOL) isPushChannelAvailable [read, assign] |
The value of this property represents the availability of the BlackBerry Dynamics Push Channel service. For an overall description of how to use the service, see under GDPushChannel.
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. In addition, key-value observing (KVO) can be applied to this property.