If you ask me which is the best feature in N9 other than swipe, the answer is Events Page. It gives a glance at the stream of data from your social networks, messaging and of course third party apps without opening any of these. The only other OS that integrated events elegantly is Windows Phone with live tiles, but it is not as expressive as the event stream you see in N9. This article highlights how you can integrate your application’s events and notifications into events page. Before getting into the details please be aware that events page is a very valuable real estate and there is no special capability to update your events into this space. This gives your app a great power to grab user’s attention without he ever opening your app. But with great power comes great responsibility. Hence it is your responsibility not to over load the events page with too frequent data since it gives a clutter of data overflow which irritates the user, who may end up uninstalling your app. So keep this in mind and design your apps sensibly so that your great power is not your greatest enemy.
There are two ways in which you can post updates to events page, with each having their own purpose.
- Event Feeds
Event Feeds are periodic events like social networking updates. Hence the frequency is directly proportional to the number of social contacts like your twitter followers or facebook friends. Your app can use this feature if it fetches updates from a web service and wants to gain user attention to show a glance at what it got for him. Even offline apps can use events feed, a well thought out example is calender feed app.
You can post an event into events feed with MEventFeed class. Consider you are developing an app that updates breaking news from BBC. In order to update to events feed your app has to run in the background. Ideally your app can run at some 2 hour interval rather than being alive all the time in background. To cater to such scenario you can use Buteo Sync framework (this is called SyncFW in Harmattan). You need to provide your plugin to SyncFW which loads it in predefined interval where you can fetch the updates, update event feeds page and close yourself. Simple enough. There is no better tutorial than this to get started. I recommend every content presentation app that fetches content from web (unless you are using Push Notifications) to use SyncFW to stay light on phone resources and at the same time alive when required.
Also a good design is that when user taps/selects your app’s event feed, it should do an appropriate action like opening your app or launching an URL.You can do this by providing a uri scheme as the event’s action. See this blog post on launching your app for your custom uri scheme.
Notifications are a way to inform/notify the user in a non obtrusive manner. Use MNotification to publish a notification in the events page. A notification can be a reminder to the user that something of his interest happened like download finished. Again the “power with responsibility” rule applies here. If your app puts many notifications in less frequency then you should either redesign your app notification procedure or group them with MNotificationGroup. Also note that Harmattan restores the notifications across device reboots unless the user interacts with the notification in which case it is removed and the corresponding action is executed.
Make good and responsible usage of the above Harmattan features to make better apps.