Integrating BlackBerry Enterprise Mobility Server services
BlackBerry Enterprise Mobility Serverservices
This section covers the general approach for programming with the
BlackBerry Dynamics SDKand the BlackBerry Enterprise Mobility Server services. The approach consists of two parts:
- Programming an app to interact with the desiredBEMSservices
- Entitling users to the necessary applications
BEMSservices conform to the Shared Services Framework. A service consists of two applications: A program that provides the service, and an app that consumes the service.
BEMSis the service provider that must be configured for use in
BlackBerry UEM. You create the app that consumes this service.
BEMS services APIs
BEMSservices are described in the
BEMSAPI Reference Guides.
Programming your service consumer app
You must define a unique
BlackBerry Dynamicsapp ID for your application (for complete details, see Using an entitlement ID and version to uniquely identify a BlackBerry Dynamics app). The
BlackBerry Dynamics SDKhas functions to discover services, and each
BEMSservice has specific programming interfaces.
To discover the
GDServiceType. This API and other APIs for shared services are described in other sections of this guide and in the BlackBerry Dynamics API reference.
After your consumer app discovers the service, the way the app communicates with the service depends on the service definition.
BEMSservices run over SSL (HTTPS) on port 8443. Be sure your consumer application connects to the correct server and port.
Discovering the BlackBerry Enterprise Mobility Server services
Described here is a general approach to using the
BlackBerry Dynamics SDKand Server-based Services Framework to programmatically discover the
Docsservices offered by your
Next, code a service discovery query in your application program. See the
getServiceProvidersForAPI in the
The result of the service discovery query is an array of GDServiceProvider objects. Each object corresponds to a
BlackBerry Dynamicsentitlement ID that is registered as a provider of the service. Your best result is that the array has one element.
If the array is empty, it means that the current end user isn't entitled to any App ID that provides the service. In that case, your app shouldn’t use the service.
If the array has more than one element, it means that the end user is entitled to more than one GD App ID that provides the service (likely a configuration error by the enterprise). Your app would have to pick one of the GD App IDs, or try all of them, or prompt the user to select.
GDServiceProviderobject, there is a
serverClusterattribute. It contains an array of
GDAppServerobjects, each of which tells you the address and port number of a server, and the priority of that instance within the cluster.
serverClusterarray has only one element, then server selection is trivial. Use the server address and port number of the first element.
serverClusterarray is empty, that indicates an enterprise configuration error.
serverClusterarray has more than one element, then you must implement a server selection algorithm. A sample algorithm is given on the
GDMacpages in the BlackBerry Dynamics API reference, in the
getApplicationConfigsection. The algorithm is the same for the
BlackBerry Dynamics SDK for Androidand for the
BlackBerry Dynamics SDK for iOS. The recommended selection algorithm is as follows.
For each priority value in the list, starting with the highest: