The BBM™ Social Platform offers the ability to invite BBM contacts to download the app that implements this feature.
Before you begin: Make sure you visit the BBM Social Platform Development page and download the SDK for either Java® or BlackBerry® WebWorks™. Next, ensure that you’ve completed the task, Register your application with the BlackBerry Messenger, as described in the Development Guide.
What the inviter sees
What the invitee sees:
The feature is enabled via the method calls below in either Java or BlackBerry WebWorks. For a fully working sample application, download the attached project archive for either Java or BlackBerry WebWorks.
var result = blackberry.bbm.platform.io.inviteToDownload(onComplete);
The first line in the Java code is just a call to the platform to obtain a reference to the Messaging Service and isn’t necessary in the BlackBerry WebWorks implementation. The sendDownloadInvitation() and inviteToDownload() methods are where the magic happens. The platform will automatically show the user a Contact Picker UI field populated with their BBM contacts who do not already have the app installed. The user can select a contact or cancel if they changed their mind, either way, control is returned to your app as soon as the user makes a selection. This method should always be called as a response to a specific user request to invite their contacts to download your application.
To see this code in action, download the attached archives which contain Java and BlackBerry WebWorks sample projects.