In App link to BBM Channel

In my last post, I announced that I now had a BBM Channel.  As I mentioned, the main reason for creating the channel was for updates on any apps that I am creating for BB10.  As part of one of the updates to my Meetup app, I wanted a direct link to the channel, so that new users could subscribe and existing users a could see what I was up to as far as app development was concerned.

I initially tried to add the link as a URL to launch from the app, but that only launches the browser and requires the user to do another step to get to the channel.  While it did open up BBM separately from the app, it felt like something that was not connected with the app.  It almost felt like one of those annoying pop-up ads.  So, I need to find a different way.

BBM Channel web

BB10 offers Invoke access for built-in apps.  Basically, you tell the Invoke manager what application you want to open, pass in some data and the application is launched.  BBM Channels is part of BBM and is handled like BBM with a Pin to identify the channel.  This means it is handled just like calling up a BBM user by Invoking BBM and passing in the Pin. And, even though BBM Channels is new, there is a call for opening up a BBM Channel. An issue I ran into, was calling it from the place I wanted to call it from.  I had created an Application menu (swipe down menu) that allows five spots.  The plan was to combine the Privacy Policy and the Change Log into one button and then add a button for launching the BBM Channel.  However, you can’t add an InvokeActionItem to the Menu Definition section that creates the Application menu.  Which left me to adding it to an Action item on the Sheet for the Privacy Policy/Change Log.


InvokeActionItem {
	id: asBBMInvoke
	imageSource: "asset:///images/Channel-d.png"
	ActionBar.placement: ActionBarPlacement.OnBar
	title: qsTr("BBM Channel")
	query {
		invokeTargetId: "sys.bbm.channels.card.previewer"
		invokeActionId: "bb.action.OPENBBMCHANNEL"
		uri: "bbmc:C004DD717"
	}
}

And, because it is a Invoke, it opens the BBM within the application.  The “back” button presented takes the user back to the application.  Since this still allows the user to subscribe and then see what is on the channel, I’m not too worried about it.

BBM Channel Feed BBM Channel ProfileBBM Channel Sheet

Also, as you can see in the screen shot.  Instead of launching the browser in order to display the Privacy Policy and Change Log, I am just using a WebView and passing in the URL. This keeps the user in my application, while still giving me the flexibility to change the HTML for those two pages at any time without needing to update the application itself.

About DeanLogic
Dean has been playing around with programming ever since his family got an IBM PC back in the early 80's. Things have changed since BASICA and Dean has dabbled in HTML, JavaScript, Action Script, Flex, Flash, PHP, C#, C++, J2ME and SQL. On this site Dean likes to share his adventures in coding. And since programming isn't enough of a time killer, Dean has also picked up the hobby of short film creation.

About DeanLogic

Dean has been playing around with programming ever since his family got an IBM PC back in the early 80's. Things have changed since BASICA and Dean has dabbled in HTML, JavaScript, Action Script, Flex, Flash, PHP, C#, C++, J2ME and SQL. On this site Dean likes to share his adventures in coding. And since programming isn't enough of a time killer, Dean has also picked up the hobby of short film creation.