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

Posts: 102
Registered: ‎06-03-2012
My Device: Playbook
My Carrier: *

Sharing a PNG image file only shows "BBM Group"

Hi guys,


I'm trying to share a PNG image file from C++. The problem is, I'm only getting the option to share via "BBM Group". I was hoping to get "BBM", "NFC", etc. as well.


Using QML code I get the desired result, but using C++ not. And I need to use C++ for that.


    QString path = QDir::current().absoluteFilePath("data/wallpaper.png");

    bb::system::InvokeRequest request;
    bb::system::InvokeTargetReply *reply = m_invokeManager.invoke(request);


BB Apps: Pattern :: Plonk
BlackBerry Development Advisor
Posts: 15,806
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Sharing a PNG image file only shows "BBM Group"

The code you have triggers an unbound invocation, which means it'll just open using the first application it finds.  If you want to allow the user to select from a list of applications you can do something like this:


void BBMInvocation::shareImageBound()

	QString path = QDir::current().absoluteFilePath("shared/photos/avatar.png");

	m_pInvocation = Invocation::create(

	QObject::connect(m_pInvocation, SIGNAL(armed()), this, SLOT(onArmed()));

	QObject::connect(m_pInvocation, SIGNAL(finished()), m_pInvocation,


void BBMInvocation::onArmed()


Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Posts: 676
Registered: ‎05-06-2012
My Device: Dev Alpha & PlayBook
My Carrier: wifi

Re: Sharing a PNG image file only shows "BBM Group"

Trying to replicate this and getting back the following error

'm_pInvocation' was not declared in this

on the line with "m_pInvocation = Invocation::create"

Any idea what I might be doing wrong?
co-founder of Diaree | BB Dev for PictureThis
Posts: 271
Registered: ‎05-29-2013
My Device: BlackBerry Z10
My Carrier: MTS

Re: Sharing a PNG image file only shows "BBM Group"

m_pInvocation is a class private member with type Invocation *
You can give this variable another name and declare it elsewhere.
NSR Reader for BlackBerry 10 @NSRReader on Twitter
Me @xelfium on Twitter