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: 17
Registered: ‎03-28-2012
My Device: Developing on multiple models
My Carrier: Multiple providers

HCI Event not captured

Hi All,


As per the instructions in this page, I developed an HCI event handler. Here is the excerpt from my bar-description.xml.


    <invoke-target id="b10.transaction.listener">
        	<property var="uris" 

 And here is the (cut down version of the) code I use to capture the event:


	 // And finally listen for HCI events
	invokeManager = new bb::system::InvokeManager(this);
	qDebug("Registering event");
	QObject::connect(invokeManager, SIGNAL(invoked(const bb::system::InvokeRequest&)),
			this, SLOT(receivedInvokeRequest(const bb::system::InvokeRequest&)));
	qDebug("Registered event");

SeConnectionAdapter::~SeConnectionAdapter() {
	delete invokeManager;

void SeConnectionAdapter::receivedInvokeRequest(const bb::system::InvokeRequest& invReq){
	qDebug("Event captured");
	bb::system::SystemDialog *_systemDialog = new bb::system::SystemDialog(this);
	_systemDialog->setTitle("NFC Transaction");
	bb::system::SystemUiButton *confirmButton = _systemDialog->confirmButton();
	// TODO For now just display a message box
	QByteArray data = invReq.data();
	QString body("No Mime");
	if(invReq.mimeType().compare("") == 0){
		body = QString(data);

 I could see the "Registering event" and the "Registered event" debug lines. But on triggerring (for which I use the GPShell utility mentioned in the link), I don't get anything reaching my app (neither do I get a debug line as in the first line of the slot).


Can anybody figure out anything wrong in the implementation?