Do you know what it takes to make a Super App? There are certainly many aspects you can take advantage of to create the Super Apps experience, but today let’s look at using the Application Messages API introduced in 4.6 OS – also known as message list integration, which allows applications to add entries into the message list. Leveraging this API in your application will allow you to seamlessly integrate with the native email application.
New Classes or Methods:
Why should we be using Application Messages API? Simple: a BlackBerry smartphone user primarily looks at their messages application throughout the day. By displaying custom information directly in the message list, you can create that integrated experience with the messages application.
So how does this work? Basically, your application will create an ApplicationMessageFolder which will contain any messages created by your application. When an application message is added to the folder, it will be placed in the message list using the provided information from the ApplicationMessage Interface. This enables the user to open the application message, which then opens in the applications screen and contains the contextual information about this object. As shown in the screenshot above, all your application specific messages are in a single folder and appear in the user’s main messages application.
One common use case for this feature is adding a welcome message to the applications message list when the user first installs your application. You will find that applications such as BlackBerry® App World™, Facebook and Twitter do this today, making the applications more compelling and more useful for the end users. Additional examples using the Application Messages API to create this integrated experience include:
- Notifying the BlackBerry User upon the receiving new information; examples include weather alerts, status of flight, or even notifying the user if friends are in the same city.
- Alerting the user on application upgrade availability. For example, BlackBerry App World integrates with the Application Messages API and notifies the user on application upgrade availability.
Now let’s look at the Application Indicator API, which goes hand-in-hand with the Application Messages API. As shown in the screenshot below, the Application Indicator API allows applications to leverage the top banner area to display a new notification, in order to inform the user of an event occurring with your application.
Similar to how the email application displays a counter for the number of unread emails, an application can provide an image and optional count that is specific to the application itself. As shown in the above image, an application icon appears in the banner section with a value shown as 19. As best practice, your application message should always be paired with ApplicationIndicator, using it as an unread count as seen in the above screenshot (although ApplicationIndicator may not necessarily require ApplicationMessages).
Another best practice to consider when using the Application Message API is to not clutter your end user’s main inbox. To avoid this negative experience, you should provide your users an option to disallow your application-specific messages from appearing in the main inbox. One other important note I want to mention is that when using the Application Messages API, your application needs to perform an initialization on device startup by registering the application indicator and message list. This is also demonstrated in the Message List Demo sample application which can be found as part of your BlackBerry JDE installation.
As you can see, Application Messages API integration gives your application the ability to provide an effective user experience. Since your application is now one step closer to delivering the Super App experience, I’d like to remind you that you can qualify for the BlackBerry Super Apps Developer Challenge and win some great prizes – this is your last weekend to enter (here are some additional tips to help you out if you’re stuck)!
Please write your thoughts in the comments section, and let us know what your favorite applications are that take advantage of Application Messages API integration. Also, if you have any questions please ask away!