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

Regular Visitor
Posts: 1
Registered: ‎06-09-2013
My Device: Z10
My Carrier: N/a

InvokeManager invoked slot problem

I am having a problem with receiving an invocation. I would be grateful if someone could provide some insight into what my issue could be. I believe I've followed the documentation at https://developer.blackberry.com/cascades/documentation/device_platform/invocation/receiving_invocat... but the code on that page is a poor sample (also, it contains at least one error), and I cannot figure out what I am doing wrong.


My bar-descriptor.xml is set up properly (as a share target). The slot is properly connected to the invoked signal (connectedResult - below - is true on execution). The app is running and properly takes focus when the data is shared from another app, but the slot connected to the invoked signal is never called.


Here is main:


Q_DECL_EXPORT int main(int argc, char **argv)
	InvokeManager invokeManager;
	MyApp myApp;

	bool connectedResult = QObject::connect(&invokeManager, SIGNAL(invoked(const bb::system::InvokeRequest&)), &myApp, SLOT(onInvoke(const bb::system::InvokeRequest&)));

... (etc)



This is the MyApp object definition:


class MyApp : public QObject {


	virtual ~MyApp();

public slots:
	void onInvoke(const bb::system::InvokeRequest &request);


Posts: 249
Registered: ‎07-14-2008
My Device: Not Specified

Re: InvokeManager invoked slot problem

Please see InvokeTarget sample app.