Classical Native Development

Native SDK Development

 

In this blog post I will highlight to you the most important things you need to know as a native developer about the new Classic BlackBerry 10 device and the associated 10.3.1 tooling upgrades (native SDK/simulator/docs/samples/etc.).

New user input methods

The new classic device introduces new ways for capturing the user input. The user now has four extra physical navigation keys and a trackpad, which are located on what we call the Classic physical BELT.

Classic Samples 2

The “Call”, “Back”, and “End” navigation buttons are designed to trigger navigation events resulting in system-level actions (like invoking the phone app for e.g. in case of the “Call” button). The “Menu” button, on the other hand, is designed to trigger a screen event (a press+hold event on the “Menu” button for e.g. will open the app menu, while a single press will bring up the action menu of the app). Finally, the trackpad is designed to act like a mouse or a joystick that allows the user to surf the screen from a single button.

New Documentations

To help you learn more about native design and development for the Classic, we have added two new documentation pages where you will find all you need to know: one that discusses how to handle input from the four navigation keys and another that deals with how to handle input from the trackpad. We have also added a section to the design documents to help you follow the recommended user experience when it comes to how these keys are behaving platform-wide. Finally, the 10.3.1 release notes include a lot of useful information about the Classic tooling upgrades.

New/Updated Classic Samples

To further help you add support the Classic device to your app, we have added new Cascades samples to the Cascades-Samples repo on Github as well as updated existing ones to support the Classic device. The ones that were updated to include Classic support API’s are the popular CircularSlider and the CascadesCookbookCPP sample apps.  And the newly added ones are a sample called belt and a sample called highlighter in the Cascades samples repo and a sample called ReadySetGo in the community samples repo.

New/Updated API’s -– What to do to support Classic?

  1. The first task that you might want to implement in terms of Classic support is to check if the underlying hardware is a trackpad device. To enable you to do so, we have added a new method “isTrackpadDevice()” to the HardwareInfo API.
  2. The next thing you might want to implement for a Classic device is listening to and responding to input events from the four navigation keys: the “End”, “Call”, “Menu” and “Back”. To enable you to do so, we have added a new API called DeviceShortcut. The way to use this API is demonstrated in the new belt sample app as well as the circularslider app.
  3. The next customization option that is available to you is customizing the initial focus policy of your controls using the NavigationFocusPolicy API or customizing the navigation path using the Navigation API. Again, the circularslider sample app is where these functionalities have been showcased.
  4. The next option is for you to customize the highlighting style of your controls. In order to allow you to do so we have added the BrightnessEffect and the FocusHighlightEffect API’s, which are demoed using the newly added highlighter sample app.
  5. Finally, one more thing you might want to consider in terms of Classic support is to make your app listen to and handle trackpad events like finger moves or button presses. To enable you to do so, we have added two new API’s: the TrackpadHandler and the TrackpadEvent Their use is well-demoed in the updated circularslider sample app as well as in the new belt sample app.

Updated Tooling

Next to the updated docs, samples and API’s, we have also released a few updates to the tooling to support the Classic device. The new 10.3.1 BlackBerry 10 Simulator now comes with controller support for the Classic device. And finally, the new release of the BlackBerry 10 Momentics IDE version 2.1.1, now comes with new features to support the BlackBerry 10 Classic device: It provides direct integration with the 10.3.1 SDK and the 1.4 Cascades library (which both are required for Classic development) and it supports the Classic resolution in the QML Preview feature under “BlackBerry 10 Keyboard (720×720) – Classic”.

I hope you will find the above compilation of Classic resources useful. Let me know if you have any questions in the comments’ section below. I’ll be happy to answer those…

@SamarAbdelsayed

About Samar

A member of the awesome Developer Relations group at BlackBerry. A passionate flow charter and C++ coder. In love with Cascades. It is very easy to learn and truly fun to work with.

Join the conversation

Show comments Hide comments
+ -
blog comments powered by Disqus