It seems like the browser you are using has JavaScript disabled. As a result, the site will not function properly. We really want you to enable it so you may experience our site as we intended it. If you have no idea what we are talking about or if you need help, visit http://www.enable-javascript.com×
This website uses cookies. By continuing to browse this site you are agreeing to our use of cookies. Find out more on our cookie page.×

Oops, it seems like you're using an old browser that we do not fully support. If you're able to, please upgrade your browser here.×
This website uses cookies. By continuing to browse this site you are agreeing to our use of cookies. Find out more on our cookie page.×

Featured library: Unified Data Source

Integrating your app with other apps on a BlackBerry 10 device, to give users quick and easy access to your app's data, is a key principle of BlackBerry 10 development. This week, we take a look at the Unified Data Source library and how you can use it to give your app (and its data) some extra visibility.

The Unified Data Source (UDS) library is sometimes called Hub Integration, and that's a good name for it. This library, which uses C, lets you add data from your app to the BlackBerry Hub. You can add, update, and remove custom entries that represent any data from your app that you want to display in the BlackBerry Hub. You could add alerts for events that affect your app (such as available updates), or you could simply provide another location for users to access the data in your app, without having to actually open your app at all.

Elements of the UDS library

The library is built by using several key elements, each of which can help you organize and manage the items that you add to the BlackBerry Hub:

Accounts

An account represents a grouping of related items that can be displayed together in the BlackBerry Hub. If you open the BlackBerry Hub on a device, you'll notice that there are already some accounts that are predefined, such as "Notifications", "BBM", and "Text Messages". These accounts appear as tabs in the BlackBerry Hub, and you can add your own accounts to this list.

Inbox list items

An inbox list item is an individual item that appears in an account in the BlackBerry Hub. You can add data from your app as inbox list items, and you can associate these items with accounts in the BlackBerry Hub so that they're displayed on that account's tab.

Categories

A category is a grouping of items within an account. You can use categories to sort and filter inbox list items in the account. For example, a messaging account might contain folders for different types of messages, and each folder is considered a category.

Account actions

An account action is an option that users can select when they view a particular account in the BlackBerry Hub. Account actions can appear in the action bar at the bottom of the screen, in the overflow menu, or in both locations.

Inbox item actions

An inbox item action is similar to an account action, but applies to the inbox list items that appear within an account in the BlackBerry Hub. Inbox item actions appear in the context menu when a user presses and holds an inbox list item.

Give me some examples, already!

Knowing how the UDS library is structured is a good place to start, but what are some typical situations where you might want to add your app's data to the BlackBerry Hub?

A messaging app: Create an account in the BlackBerry Hub that represents your messaging app, and then add any new messages or conversations to that account as inbox list items. Your users see new message notifications for your app's account when they view the BlackBerry Hub, and they can access the messages right away.

A game: Use an account in the BlackBerry Hub to let users know that information about your game has been changed or updated. You could alert them that someone beat their high score, or let them know that their friends are online and waiting for them to join the game.

A productivity app: Make sure that users never miss an important entry in your app by adding reminders to an account in the BlackBerry Hub. You might remind users that their taxes are due, or prompt them to set aside their monthly contribution to their retirement fund.

1. Download the tools

Before you start developing, you'll need to visit the Downloads tab. Here you'll find downloads for the BlackBerry 10 Native SDK, BlackBerry 10 Device Simulator, and some other useful tools.

2. Try the sample apps

Now featuring a filter control, the Sample apps tab allows you to search for samples by name or by feature.

Select either the Core or Cascades radio buttons to display the samples relevant to you.

3. Educate yourself

The Documentation tab contains tons of examples, tutorials, and best practices to guide you along the path towards building an awesome app.

You can access all the documentation that you need in the left-hand navigation.

4. Start developing

The Reference tab is where you'll find essential details about how to use our APIs.

You can use the left-hand navigation to choose how you would like to browse the reference: by module, by topic, or alphabetically. If you have an idea of what you are looking for, start typing it in the Filter box.