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: 27
Registered: ‎03-27-2011
My Device: Z10,Q10,Z30
My Carrier: Verizon and ATT

Capturing the signals from API (specifically contactsAdded() signal after calling createContact of ContactService)

I am calling ContactService.createContact() . The console is showing that contactsAdded() signal is emited. How I can catpure that signal from C++? I tried to add contactsAdded.connect(fn), but its giving compiler error. How I can define a function in C++, which will be called when the API ContactService emits contactsAdded() signal after contact is added successfully.

 

Or in general, if the APIs we are calling is emiting a signal, how we can catpure it..?

 

 

Highlighted
Retired
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: Capturing the signals from API (specifically contactsAdded() signal after calling createContact of ContactService)

Try this: https://developer.blackberry.com/native/documentation/cascades/dev/signals_slots/

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
Developer
Posts: 27
Registered: ‎03-27-2011
My Device: Z10,Q10,Z30
My Carrier: Verizon and ATT

Re: Capturing the signals from API (specifically contactsAdded() signal after calling createContact of ContactService)

I tried the following

 

 

ContactService service

ContactBuilder builder;

 

QObject::connect(service,
                                                         SIGNAL(contactsAdded()),
                                                         this,
                                                         SLOT(contactAdded()));
                        service->createContact(builder, true);

 

contactsAdded is the signal as per the documentation. but "contactAdded()" is not getting called.

 

if I call  service->createContact(builder, true); without postal address, contact is getting created. But when I call builder.addPostalAddress(), contact is not added to work perimeter contacts, when i call createContact.

 

If there is no postal address, its working.. I am not sure whether its a bug or I am doing it wrong. I tried example from the site and its still not working..

 

 

Retired
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: Capturing the signals from API (specifically contactsAdded() signal after calling createContact of ContactService)

That's odd. Sounds like it could be a bug, if it's just the postal address that is making the difference. Please log an issue on the Developer Issue Tracker: DIT

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker