Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 669
Registered: ‎02-19-2011
My Device: BlackBerry PlayBook 32GB
My Carrier: Sprint
Accepted Solution

integrating the BBM: Invite to download example

Hi all, I have an app with a tabbedpane and I'd like to integrate the BBM: Invite to download example. Since I'm a C++ n00b I have absolutely no idea on how to do that. The example app starts on the screen where one can click the button to invite friends through BBM. I want this functionality to be in a new tab. Any pointers on what I'd need to change to make this work?

Staff UI Prototyper (read: full-time hacker)


My BB10 apps: Screamager | Scientific RPN Calculator | The Last Weather App

Developer
Posts: 614
Registered: ‎10-17-2010
My Device: (BlackBerry Z10)-> Q10/Passport Dual Use

Re: integrating the BBM: Invite to download example

Hey Marco,

 

Check out the following GitHub repo sample project.

https://github.com/blackberry/Cascades-Samples/tree/master/bbminvitetodownload


Editing the code for your app

main.cpp

//TODO: Define your own UUID here. You can generate one here: http://www.guidgenerator.com/
const QString uuid(QLatin1String(""));   // go to the site ^. Generate code. Copy and paste code between "" here.


The project's main qml file is invite.qml

Parts of the code that initiate the "Inviting" are

_inviteToDownload.sendInvite();

 
What the heck is that you ask? 

in src/InviteToDownload.cpp line no. 40 you see

qml->setContextProperty("_inviteToDownload", this);

 
This enables your main qml file aka qml-> to use method "sendInvite()" from invite.qml

When your app starts, you need to register it to the BBM service. Thats where Registration.cpp/registration.qml files come in.

Don't forget to check "BBM" in your application-descriptor file.

Hope that makes sense.

 



Developer
Posts: 669
Registered: ‎02-19-2011
My Device: BlackBerry PlayBook 32GB
My Carrier: Sprint

Re: integrating the BBM: Invite to download example

Not completely. I have a tabbed app and I want to add an extra tab in which you can do the BBM invite friends thing. I have the pages for my tabs in separate QML documents. How do I 'hook this up' so I can have a new tab with a button in it that will invoke the invite to download stuff when tapped?

Staff UI Prototyper (read: full-time hacker)


My BB10 apps: Screamager | Scientific RPN Calculator | The Last Weather App

Developer
Posts: 669
Registered: ‎02-19-2011
My Device: BlackBerry PlayBook 32GB
My Carrier: Sprint

Re: integrating the BBM: Invite to download example

Is there nobody who can help with this?

 

I'd like to see an app with some tabs, one of them having the BBM invite to download screen on it. I have absolutely no clue how to integrate the current example which is a stand-alone app with one screen.

Staff UI Prototyper (read: full-time hacker)


My BB10 apps: Screamager | Scientific RPN Calculator | The Last Weather App

Highlighted
Developer
Posts: 669
Registered: ‎02-19-2011
My Device: BlackBerry PlayBook 32GB
My Carrier: Sprint

Re: integrating the BBM: Invite to download example

I got it to work and did a writeup on how I managed to do so:

 

https://forrst.com/posts/Adding_BBM_Invite_To_Download_to_your_BlackBerry-FmY

 

Enjoy!

Staff UI Prototyper (read: full-time hacker)


My BB10 apps: Screamager | Scientific RPN Calculator | The Last Weather App

Developer
Posts: 173
Registered: ‎07-16-2013
My Device: BlackBerry Limited Edition Z10, BlackBerry Playbook
My Carrier: Idea

Re: integrating the BBM: Invite to download example

I wanna do the same. But through ActionItem and not a Button. What shall I do.

Please help.

Click on Like Button if I helped you. Accept As SolutionIf my response solved your problem.
Developer
Posts: 173
Registered: ‎07-16-2013
My Device: BlackBerry Limited Edition Z10, BlackBerry Playbook
My Carrier: Idea

Re: integrating the BBM: Invite to download example

Can you please give me a code that could work with any input control and not just a Button.

Click on Like Button if I helped you. Accept As SolutionIf my response solved your problem.