About this group

The core value of this group is to bring developers up to speed with BB technology, concentrating on BB10.Exploring efficiency, beauty and power BlackBerry provides to its users by designing Apps that can be used globally and that improves developers life as it improves community life.

Contact Name: Michael Kimathi
  Contact the manager of this GroupSpaces group
Category: Other

News & Announcements

BlackBerry Developer Meet-up September (Built For BlackBerry Revitilized)

  • Saturday, 14th September 2013 at 3:30pm - 8:30pm
    Location: ihub Bishop Magua Building George Padmore Lane Nairobi, Nairobi KE

    Register Here

    • 12 people attended

Built For BlackBerry and Certification

  • Saturday, 3rd August 2013 (all day)
    Location: Ihub 4th Floor Bishop Magua Centre

    Now that everyone is looking forward to build application which qualifies for built for BB We…

    • 45 people attended


  • Saturday, 4th May 2013 at 10am - 5:30pm
    Location: IHub Nairobi

    It was amazing to get great ideas hit the floor as we get new developers started as well as…

    • 22 people attended

Previous items

RSS Feed

Use the BBM Enterprise SDK to Interface with Your Custom Hardware

Let’s begin by taking a look at Rachel: a (fictional) young professional who lives in our remarkably connected world. Her day begins with a fresh cup of coffee from her IoT brewing machine, which she enjoys as her mattress uploads her sleeping patterns to the cloud from the night before. Her car knows exactly what time she needs to leave to make it to work at 9:00 AM but picks her up 5 minutes earlier today since highway traffic is heavier than normal. When Rachel arrives at the hospital to do rounds, her patient’s Emergency Medical Records (EMRs) are seamlessly loaded onto her tablet. Thanks to the connected pulse oximetry machines at the hospital, she is also alerted that Mr. Anderson in room 1808 has been experiencing low SpO2 levels since last night.

The information collected and distributed by the connected devices in Rachel’s day could wreak havoc on her life if they were to ever be intercepted and fall into the wrong hands. Privacy is of the upmost importance in the digital era, which is why securely transferring data between peripheral devices and access points is crucial. BlackBerry’s BBM Enterprise SDK was built from the ground up to do just that.

Getting Started Interfacing with Your Custom Hardware

While the BBM Enterprise SDK is capable of securely transferring copious amounts of data at outstanding speeds, the project discussed in this blog will get you up and running sending small packets of data with a simple colour picker application. The app will allow you to authenticate your iOS device using Google Sign In, then to select a colour that will be sent to a Raspberry Pi and displayed on an RGB LED.

This sample will get you off the ground and ready to implement the BBM-E SDK with your own IoT devices, providing you with the secure data transfer service you need.


For this project to run, you will need the following components (or similar):

  • iOS device
  • Raspberry Pi 3 running Raspbian OS
  • RGB LED (common cathode LED used in sample)
  • 220Ω 1/4W resistor (x3)
  • Solderless breadboard
  • GPIO breakout board or female-male jumper wires
  • Male-male jumper wires

Begin by configuring your hardware for this sample. Your Raspberry Pi should be configured as shown in the diagram below; GPIO pin 17, 27 and 22 should be connected to the RGB LED’s red, green and blue leads, respectively, through a 220Ω resistor. The common cathode of the LED is then connected to ground (-).

This image was created with Fritzing (https://github.com/fritzing/fritzing-app) and is licensed under CC-BY-SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0/)

Once your hardware is configured, it’s time to configure the backend services to work with your project.

Configuring Your Project with BlackBerry and Google

We will be using Google’s Sign-In API for this sample, however you can use any OAuth provider with BBM-E. Begin by heading to your Firebase Console and doing the following:

  1. Select ‘Add a New Project’.
  2. Select “Add Firebase to Your Web App” and make note of the firebaseConfig parameters that you are prompted with.
  3. Close the pop up and then select “Add Firebase to Your iOS App”.

Once you have done so, open up Google’s API Console and do the following:

  1. Select the project you just created in Firebase from the drop down.
  2. The BBM-E SDK requires that you include the Google+ API, which you can do by pressing ‘Enable APIs and Services’, searching “Google+ API” and enabling it for this project.
  3. Your next step is to create the required OAuth credentials and provide them to BlackBerry PCE. Begin by selecting “Credentials” in the left tab of your Google API Console, and finding the OAuth 2.0 Client IDs for the Web and iOS clients at the bottom of the page.
  4. In My Organization Account, paste the Keys for the Web and iOS clients under OAuth Client IDs in the application you wish to work with for this project.

Your project is now configured with BlackBerry and Google; it’s time to dive into some coding.

Running the Node.js Sample on Your Raspberry Pi

In order for your Pi to use the BBM-E SDK, you will need to ensure that the latest version of node and npm are installed on your machine. Do this by running the following commands on the terminal:

$ sudo apt-get update

$ sudo apt-get dist-upgrade

$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -

$ sudo apt-get install -y nodejs

To verify the version of node and npm installed, run the following commands:

$ node -v

$ npm -v

Note that this sample was built using Node version 9.5.0 and npm version 5.6.0. If you have installed an earlier version of either, it is recommended that you update before continuing.

Now that node and npm are installed, you will want to download and unzip the Node.js BBM-E SDK on your Raspberry Pi which can be found here. Rename the unzipped SDK to “bbm-enterprise”. Next head over to this repository and download the Node.js sample files for this project.

The sample project requires you to install a handful of third party libraries to successfully authenticate the user and interface with the Pi’s GPIOs. To do so, run the following commands in the project directory:

$ npm install

After the third party libraries have successfully installed, you will need to install the BBM-E SDK for your project to use. Navigate to the unzipped SDK that you previously renamed “bbm-enterprise” and copy it. Next, head over to the node_modules folder in your project directory and paste in the SDK. The final step is to run the following npm command to start instillation:

$ npm install <PATH_TO_UNZIPPED_SDK> --production

It is important to note that the PATH_TO_UNZIPPED_SDK is not the path to the SDK you just pasted in node_modules; it is the path to the original instance of the SDK that you previously copied. If you left the SDK in your downloads folder, you will set the path to  /home/pi/Downloads/bbm-enterprise.

After installation is complete, we will want to configure this sample to use the OAuth Client and Firebase project that we set up earlier. Heading back to your Firebase Console, copy the contents of the config object you are presented with when you select “Add Firebase to Your Web App” and paste them in the firebaseConfig object of the project’s config.js file. Then, head back to your Google API Console open the Web client details under OAuth 2.0 Client IDs. Copy the Client ID and Client Secret, pasting them in under the ‘client_id’ and ‘client_secret’ properties, respectively, in config.js. The final step is adding the BlackBerry Domain to your config.js file; open up My Organization’s Account and navigate to application you are using for this project. Select the application’s Domain under Summary, and paste it under the ‘id_provider_domain’ property of the config.js file.

Your Node.js sample is now setup to run. Navigate to the project directory in your terminal and run the following command to start your project:

$ sudo node BBMColourPicker.js

Your RGB LED should illuminate green and you should be prompted to log in with Google. Once you do so, you will see the following lines on your terminal:

Your peripheral device Reg ID is: 897689437282941152

Copy this value and paste it in your iOS applications PERIPHERAL_REG_ID parameter in the ConfigSettings.h file.

Make note of the Reg ID printed in your console; this is required for the next step of this walk through.

Running the iOS Colour Picker App

The final component of this project is running the Colour Picker Application on your iOS device. Begin by downloading the sample code from this repository, and the BBM-E SDK for iOS here. Next, install the required pods for the project by navigating to your project directory in terminal and running the following command:

$ pod install

Once the pods are finished installing, add the SDK to your project by opening the SDK package you downloaded, copying the ‘sdk’ and ‘sdk-release’ folders and pasting them in your project directory. Your project makes use of the support libraries included in the examples directory of the SDK package; copy this folder and also paste it in your project directory.

Before you can run the iOS sample app, you will need to configure it to use the OAuth Client, Firebase project and Reg ID that we set up earlier. Open the .xcworkspace and then open ConfigSettings.h. Begin by filling in the SDK_SERVICE_DOMAIN property by pasting in the BlackBerry Domain you found for the Raspberry Pi on your My Organization Account. You will also be able to fill in the PERIPHERAL_REG_ID property from the console print out when you ran your Node.js project for the first time. Finally, head back to your Google API Console and copy the Key for your iOS Client; paste this under the GOOGLE_SIGNIN_CLIENTID property in ConfigSettings.h to finish setting up your iOS application.

Running the Sample

Now that the Node.js and iOS samples are configured, go ahead and run the iOS sample code on your device. Press the Google sign in button, and when prompted, make sure you sign in with a different Google account than the one you are currently signed in with on the Raspberry Pi. Once signed in, press “Pick a new Colour” and move the cursor around the colour wheel; watch as the colour of the RGB LED changes accordingly!

Next Steps

Congratulations! You have successfully interfaced with a hardware device securely using the BBM-E SDK. Now that you’ve got your feet wet with hardware, why not dive in deeper? Use this sample project as a starting point to interface with more complex hardware setups. Attach a heart rate monitor, RFID reader, IR camera or your own Rube Goldberg machine; the possibilities are literally endless. You can check out more samples built with the BBM-E SDK here, and learn more about getting started with the SDK here.  Happy experimenting and remember: just because it’s HARDware doesn’t mean it’s hard!

5 days ago
Add a Secure Chat Widget to Your Webpage—In Under 30 Minutes!

Customer service is more important than anything. That’s why it’s not a surprise that users who receive great support are more loyal and more likely to recommend your product. As this becomes a driver for software enhancements, developers must enable real-time support services within their apps to deliver easy, anytime support.

That’s where BBM Enterprise SDK comes in. A secure cloud-based CPaaS (communications platform a service), it provides a ready-made framework to integrate chat, voice, video, and data sharing directly into your apps—to provide the immediate level of service users have been wanting.

Now we want to help jumpstart your product enhancements—all in under 30 minutes! We are pleased to release a new chat widget sample for you to use on your web page.

This JavaScript code sample illustrates how to embed our secure chat widget out-of-the-box to deliver live chat to your users, powered by BBM Enterprise SDK.

Imagine, for example, that a client is on a mortgage broker’s website looking at quotes, and has a question about one of them. He can simply click the “chat now” to bring up a JavaScript-based web chat window. This will in turn connect them to a broker using the company’s BBME SDK-enabled internal application.

In addition, the chat widget possesses many other features that facilitate excellent customer service.

  • High priority messages
  • “Delivered” and “Read” statuses
  • Support for files and pictures

View the video below to see how the chat widget works.

You can reuse this chat widget out-of-the-box or customize it to suit your business needs.

To get this chat widget code, click here.

To learn more and download the free SDK visit www.blackberry.com/bbmesdk.


on 15th February
Test your Dynamics Apps with BBD Automated Test Support for iOS

If you’ve ever developed an app that requires user authentication, you surely know the pain of entering test@test.com and abc123 into your login text fields every time you want to see how that new shade of red looks on a UI button. Of course, there are workarounds for this such as automatic login methods and pre-filled text fields, but these workarounds can compromise the security of your Application. Fear not; with BlackBerry’s Automated Testing Support Library for the BlackBerry Dynamics SDK, you’ll never have to enter another abc123 password again (unless that’s your computer password, which I would not recommend)!

Get Started Using the Automated Testing Support Library

While the Automated Testing Support Library for BlackBerry Dynamics SDK contains a plethora of powerful testing features, a good starting point for integrating the library with your app tests is automated logins. This project makes use of BlackBerry’s newly released BlackBerry Dynamics SDK Beta; sign up here to gain access to the SDK Beta. Before you begin, make sure that you follow these instructions to install the BlackBerry Dynamics SDK for iOS if you have not done so already. Note to only follow the linked instructions up to Deploy and Test > Entitle App Users part 6; the remaining steps will be automated by the following test. By the end of the linked tutorial, you will have a blank BlackBerry Dynamics application running and setup with your UEM server.

Once you have a blank BlackBerry Dynamics app running on your device, it’s time to add the required libraries to get testing! By default, the AutomatedTestSupport library needs to be added to your project directory before you can start using its features. In Finder, navigate to ~/Library /ApplicationSupport /BlackBerry /Good.platform /iOS /AutomatedTestSupport and drag “Core” over to your Xcode projects under the <project_name>UITests folder. Ensure that “Copy items if needed” is selected, along with “Create groups” and all targets are selected.

Now that the libraries are added, it’s time to dive into some coding. We’ll begin by creating a file that contains your credentials that the UITest will use to automatically populate the Email Address, Access Key and Password fields! Begin by creating a new empty file under <project_name>UITests named “credentials.json”. In the new json file, paste the following code:




Each GD_TEST_PROVISION property represents a string that the BlackBerry Automated Testing Library will fill in automatically. Begin by entering your user email, followed by generating a BlackBerry Dynamics Access Key in the UEM console. Paste the newly generated access key in the credentials.json file, making sure to remove any dashes and spaces (the key should be a 15 character long string). Finally, enter a password that you would like to use to log into your Dynamics application. Now it’s time to move to the meat and potatoes of this tutorial: coding the test!

Note: if you are using the newest beta version of the BlackBerry Dynamics SDK, you will need to add a <bundle_identifier>.sc3 property to your URL Schemes in your app’s Info.plist. Since the newest beta version also permits use of Apple’s new face ID feature to sign into Dynamics, you will also need to add a NSFaceIDUsageDescription key to your Info.plist accompanied by a brief descriptor of why your app requires this access.

Automated Testing Library with Objective-C

Begin by including the BBDAutomatedTestSupport header file by pasting the following line in <project_name>UITests.m:

#import “BBDAutomatedTestSupport.h”

Next, delete the launch XCUIApplication call under the setUp method; we are going to move this to a custom test method. The test method we will be using, testProvision, will run two tests: check if the user has successfully activated their BlackBerry Dynamics App, and a simple check if the main UI is shown on the screen. To achieve the latter of the two, head to ViewController.m and paste in the following code to indicate that ViewController is your main UI:

self.view.accessibilityIdentifier = @”MainVC”;

Now it’s time to automate your test. Open <project_name>UITest.m and replace the method named testExample with the following code:

- (void)testProvision {
    XCUIApplication *application = [[XCUIApplication alloc] init];
    [application launch];
    BBDAutomatedTestSupport *ats = [BBDAutomatedTestSupport sharedInstance];
    [self fetchCredentials];
    [ats setupBBDAutomatedTestSupportWithApplication:application forTestCase:self];
     // test 1: if the user has successfully activated their BlackBerry Dynamics App
    BOOL isActivationSucceed = [ats loginOrProvisionBBDApp];
    XCTAssertTrue(isActivationSucceed, @"Activation Failed!");
     // test 2: if main UI is shown on screen
    BOOL mainUIShown = [ats isScreenShown:@"MainVC" timeout:50.f];
    XCTAssertTrue(mainUIShown, @"Main UI is not on screen");

- (void)fetchCredentials {
    // get user credentials (email, access key, password) from credentials.json
    // and pass to BlackBerry Dynamics SDK
    NSString *credentialsJSONBundlePath = [[NSBundle bundleForClass:[self class]] pathForResource:@"credentials" ofType:@"json"];
    [[BBDAutomatedTestSupport sharedInstance] fetchCredentialsFromFileAtPath:credentialsJSONBundlePath];

The method fetchCredentials looks at the credentials.json file you created earlier and passes the information to the BBDAutomatedTestSupport library to automatically populate the textfields upon login. You are now set to start testing your app!

Automated Testing Library with Swift

If you’re a modern day Swift programmer, there’s one small additional step you’ll have to follow to gain access to the BBDAutomatedTestSupport library: add a bridging header. To do so, press the + button on the bottom left corner of Xcode to add a new file; select “UI Test Class Case”, set the language to Objective-C and select “Okay” when you are prompted to create a bridging header file. This is a little hack I’ve picked up throughout my Xcode ventures; in contrast to manually doing so, this method of creating a bridging header allows Xcode to take care of configuring the project settings to incorporate the file. You can now delete the .m UI Test Class Case file that you just created. In The <project_name>-Bridging-Header.h file, paste the following code:

#import “Core/BBDAutomatedTestSupport.h”

Next, delete the launch XCUIApplication call under the setUp method; we are going to move this to a custom test method. The test method we will be using, testProvision, will run two tests: check if the user has successfully activated their BlackBerry Dynamics App, and a simple test if the main UI is shown on the screen. To achieve the later of the two, head to ViewController.m and paste in the following code to indicate that ViewController is your main UI:

self.view.accessibilityIdentifier = “MainVC”

Now it’s time to automate your test. Open <project_name>UITests.swift and replace the method named testExample with the following code:

func testProvision () {
    let application : XCUIApplication = XCUIApplication()
    let ats : BBDAutomatedTestSupport = BBDAutomatedTestSupport.sharedInstance()
    ats.setupBBDAutomatedTestSupport(with: application, for: self)
    // test 1: if the user has successfully activated their BlackBerry Dynamics App
    let isActivationSucceed = ats.loginOrProvisionBBDApp()
    XCTAssert(isActivationSucceed, "Activation Failed!")
    // test 2: if main UI is shown on screen
    let mainUIShown = ats.isScreenShown("MainVC", timeout: 10)
    XCTAssert(mainUIShown, "Main UI is not on screen")
func fetchCredientials () {
    // get user credentials (email, access key, password) from credentials.json
    // and pass to BlackBerry Dynamics SDK
    let credentialsJSONBundlePath : String = (Bundle(for: type(of: self)).path(forResource: "credentials", ofType: "json"))!
    BBDAutomatedTestSupport.sharedInstance().fetchCredentialsFromFile(atPath: credentialsJSONBundlePath)


The method fetchCredentials looks at the credentials.json file you created earlier and passes the information to the BBDAutomatedTestSupport library to automatically populate the textfields upon login. You are now set to start testing your app!

Build and Test

You are now set to start testing your application and make use of the powerful features offered in BlackBerry’s Automated Testing Support Library! If this is the first time you are launching your app on your device, be sure to build and run your app to configure it with the BlackBerry UEM Client application; doing this in test mode will stop the test prematurely. Once configured with the UEM Client app, build and test your application and watch as the Automated Testing Support Library automatically populates your credentials!

Moving Forward

Congratulations, you have now successfully built and tested your first iOS app using BlackBerry’s Automated Testing Support Library! After you’re done celebrating this triumph, try implementing the unLockBBDApp method to unlock an app that was previously locked with the UEM console, or the waitForRemoteLock method to test BlackBerry UEM’s remote lock functionality. The test you just built comes standard in all of the Objective-C examples in the BlackBerry Dynamics SDK, so testing those will now be a breeze; you can also refer to the example tests for insight on how to use the framework to speed up your testing workflow. You can also check out this great blog to get started using the testing framework for your Android apps. This is only the start to what you’re now capable of testing with the support library; with this primer you can now take your iOS testing abilities to the next level and code with confidence. Happy testing!

on 8th February

Create a site like this for your own group.
Take a Tour or Sign Up



March 2018
« »
Mon Tue Wed Thu Fri Sat Sun
26 27 28 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31 1

BlackBerry Enterprise Developers Kenya

Powered by GroupSpaces · Terms · Privacy Policy · Cookie Use · Create Your Own Group