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

Reply
Developer
TheMarco
Posts: 669
Registered: ‎02-19-2011
My Device: BlackBerry PlayBook 32GB
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
greenback
Posts: 535
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.

 


:Rockon:

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

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
TheMarco
Posts: 669
Registered: ‎02-19-2011
My Device: BlackBerry PlayBook 32GB

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

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

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
SiddharthAjmera
Posts: 173
Registered: ‎07-16-2013
My Device: BlackBerry Limited Edition Z10, BlackBerry Playbook

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
SiddharthAjmera
Posts: 173
Registered: ‎07-16-2013
My Device: BlackBerry Limited Edition Z10, BlackBerry Playbook

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.