This post will cover how to configure your BlackBerry 10 application as an invocation target for the Hub and Calendar applications.
In BBOS, the capability existed to add custom menu items at the system level, not only at the application level. This feature could be used to integrate your application with the other applications on the device. This was a powerful capability, when considered from the perspective of a single application, however with many applications utilizing it user confusion could result. In order to improve the user experience a new approach was taken to implement this use case in BlackBerry 10 utilizing Invocation Framework.
If you are not already familiar with the Invocation Framework check it out here.
BlackBerry 10 Applications are able to register with the Invocation Framework as invocation targets. This enables the application to be shown on other application share menus when the content being shared matches its registered filter. The Invocation Framework dynamically generates the targets displayed on a share menu from registered applications on the device.
BlackBerry 10 is a dual persona device that keeps personal and work data separate via the integrated BlackBerry Balance technology. This results in powerful Hub and Calendar applications that can securely manage both sets of data while maintaining a single application view for ease of use. When building and deploying your target applications you will need to keep this in mind since… personal space applications are able to register as share targets for personal data only
- personal space applications are able to register as share targets for personal data only
- work space applications are able to register as share targets for work data only
The application doesn’t need to be coded differently based on the data it wants access, it just depends on which space the application is deployed.
Details on Invocation Framework support for menuing can be found here.
Now that you have the necessary background, let’s cover the specific details needed to make your application show up under the share menus for the Hub and Calendar applications. Upon first glance, people often think that the Hub does not support the share menu because there are currently very few applications integrating with it. If there is nothing registered for a specific content type, the share menu will not show up.
In order to integrate with the Hub you will need to add the following filter to the invoke-target defined in your application’s bar-descriptor.xml file
<property var=”uris” value=”pim:”/>
In order to integrate with the Calendar you will need to add the following filter to the invoke-target defined in your application’s bar-descriptor.xml file
<property var=”uris” value=”file://”/>
<property var=”exts” value=”ics,vcs”/>
That’s all there is to it. This demonstrates the power of the Invocation Framework in providing an integrated solution platform rather than just a series of silo applications. I look forward to hearing your success stories @stepleon.