Power up! BlackBerry 10 WebWorks SDK super-sized

I really don’t know where to begin with this blog post — there is just so much goodness being delivered in the latest BlackBerry® 10 WebWorks™ SDK release!

We have to start with a huge shout-out to the BlackBerry WebWorks dev team for some truly remarkable work preparing for this blockbuster. I have been with RIM® for just over 10 years — been there, done that, thought I had seen it all. But I can honestly say that the energy, passion, and dedication to make BlackBerry 10 truly astonishing is unmatched by anything that has come before.

And the passion is company-wide. Don’t take my word for it — this from one of the devs on the BlackBerry WebWorks team:

But back to what you came here for: the low-down on what this release of BlackBerry WebWorks has to offer. Hope you already have your coffee ready (or perhaps adult beverage of choice).

It would be remiss not to lead with the news that the first portion of PIM integration is now supported! With this release, you can create, find, modify, and delete Contacts in your address book. Just like the native application, you can get information on news related to your contact, as well as what instant messaging and social networks you are connected with them on. It’s everything you need to interact with the user’s social graph. Of course, be sure to add the new permissions to your config.xml so the user can opt in, and ensure you elegantly handle it if the user does not allow you access to their PIM data.

Drafted a close second (certainly a case could be made for this being selected number 1) is the first stage of support for the BBM Social Platform. In this release, you can register your application with BBM, interact with the user’s profile, be notified of changes to user or friend’s profiles (that also have your app installed), and allow the user to invite friends to download your application. Again, there is a new permission that you will need to include to allow your app to connect:

BlackBerry Flow is all about leveraging existing functionality – both system and third-party provided – to accomplish tasks in a consistent way, but without having to jump between applications. You can embed what you need from others inside your own application experience, and cards are what drive this experience. Think of a card as a screen that gets layered on top of your application that provides some common functionality to the user. When the user is finished interacting with the card, it animates off the stack of screens and returns any relevant data back to you. The Invocation Framework (which we introduced in a previous release of BlackBerry WebWorks) orchestrates all of this underneath the covers, so you can launch cards using invoke. With this release of BlackBerry WebWorks, you can leverage system and third-party developed cards inside your BlackBerry WebWorks application. You can also implement a card inside your BlackBerry WebWorks application and provide it for use by others! Check out the Invoked namespace in the API Reference for more details on creating your own card.

As indicated, raw invoke functionality can be used to launch cards. However, cards can be accessed in a number of other ways as well:

A couple of cards provided by the system are the File picker and Camera cards. File picker allows you to provide the user with UI to select a file from the filesystem, and you will get the path back. The Camera Card allows the user to capture pictures or video, and again you get the path back. We felt that these cards might get a lot of use, and are a little more complex to interact with directly using invoke, so we have wrapped an API around them. Check out the blackberry.invoke.card namespace.

You can also leverage the File picker and Camera cards using the new support for Media Capture in the browser – just include the capture attribute on an field. If you specify “camera” or “camcorder”, you will get the Camera card; otherwise specifying anything else will invoke the File picker. Note that an input field with capture type “microphone” is currently not supported.

<input type=”file” accept=”image/*” capture=”camera”>

In the last major release, we provided the built-in Context Menu with standard system options. This context menu is displayed when the user long presses on an item in your application. In this release, you now have the ability to customize the menu for different contexts in your application. You can remove items from the list, and even provide your own menu items for a given context (such as Image, link, and so on). In future releases, we are looking at ways to allow you to define your own custom context in your application content.

Context Menu

User experience is a prime focus for BlackBerry 10. The user should feel at home no matter where they are, and be able to customize their device for accessibility reasons as well. For example, the user can set a language, as well as a region used for formatting of dates, and so on. Font size can also be adjusted for preference or for accessibility reasons. Applications should strive to adhere to these preferences as well, so with this release, we have provided APIs and events that will allow you to know what the language, region, font, and font size are as defined in the global settings. You can adjust your applications accordingly to have a seamless experience.

An oft-requested feature is to be able to lock your application in a specific orientation. Good news — you can do it now. Check out our documentation on the config.xml file to find out how.

In order to improve memory overhead and load times, the underlying web rendering engine no longer loads the Adobe® Flash® plug-in be default. If you need to support Flash rendering in your application, you can enable it by adding the following feature element to your config.xml (note that this will be application wide, and will be ignored if found inside an <access> element):

<feature id=”enable-flash”>

If you are building a multi-page application, and even on application initial load, you may notice flickers on page transitions if your pages have any background color other than white. We have introduced the ability to specify in config.xml what your page color is, and we will use this to display between page loads to hide the flicker. Give it a try.

Be sure to check out the API Reference to get the low down on everything our Web Platform can offer to build not just web applications, but integrated web apps showcasing everything that makes BlackBerry 10 unique and powerful. And if you haven’t already, download the tools and get started — there is no better time!

About Ken W

Ken is the Senior Product Manager for the WebWorks group at BlackBerry. He is responsible for WebWorks tooling and is heavily involved in the Open Source projects at github.com/blackberry and the Apache Cordova community. Ken has a particular interest in trying to bring the internal and external BlackBerry development communities closer together.

Inside BlackBerry Developers

The views expressed on any corporate or individual's personal website or any Twitter account are not necessarily those of BlackBerry. The user's Twitter account and/or personal website, any corporate website, or any comments contained on any of the foregoing have not been reviewed by BlackBerry and do not constitute an endorsement by BlackBerry.