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
Contributor
Posts: 33
Registered: ‎01-02-2012
My Device: 9900
My Carrier: bell

BBM ERROR FOR CONTACT PICTURE REQUEST

Hello, There seems to be a problem and I am not getting any wy close to completion! So I am trying to retrieve the BBM display picture of my contacts. 1. My first step is to request the picture from BBM:  

m_service->requestDisplayPicture(QString &handel);

 

 //passing the handle as the parameter. 2. Then I connect the singnal of updating the image to slote of the image has been update......which passes all the image data from the SIGNAL to the SLOT;

  connect(m_service, SIGNAL(displayPictureUpdated(const QString,bb::platform::bbm::ImageType::Type ,const QByteArray)),this,SLOT(json(const QString,const bb::platform::bbm::ImageType, const QByteArray)));

 So for connecting the slot I am getting an error saying that, however it compiles and loads tha application on to the

target

Signal/Slot "ContactService.displayPictureUpdated(const QString,bb::platform::bbm::ImageType::Type ,const QByteArray)" is not defined

 So I have put all necessary decelaration that I was supposed to out..So somebuddy who did get this error could please help resolve this issue.

Same error is found in the sample BBMProfileBox

http://developer.blackberry.com/cascades/files/release/samples/platform/bbmprofilebox.zip

The Error can be seen Here

Problem.png

 

Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: BBM ERROR FOR CONTACT PICTURE REQUEST

[ Edited ]

Signals and slots are connected at runtime, so incorrect signatures aren't detected until the app is running.

Could you try this one:

	QObject::connect(m_service, SIGNAL(displayPictureUpdated(QString,bb::platform::bbm::ImageType::Type,QByteArray)),
					 this, SLOT(onDisplayPictureUpdated(QString,bb::platform::bbm::ImageType::Type,QByteArray)));

 

Slot declaration:

protected slots:
        void onDisplayPictureUpdated(const QString &handle, const bb::platform::bbm::ImageType::Type imageType, const QByteArray &displayPicture);

 

More info on SIGNAL/SLOT normalization:

http://supportforums.blackberry.com/t5/Cascades-Development/DropDown-signal-problem/m-p/2380869#M225...

 


Andrey Fidrya, @zmeyc on twitter
Contributor
Posts: 33
Registered: ‎01-02-2012
My Device: 9900
My Carrier: bell

Re: BBM ERROR FOR CONTACT PICTURE REQUEST

I tried doing the same thing but in the qdebug when I checked if the signal connected to the slot is connected or not, it was false. I do not know what is causing the problem is it a bug in the sdk or something else. Can u lease give it a shot and let me know please. Or if possible you can see the same error with the profile box example. Where we do not see the retrieved icons, that are called using the same procedure as I'm calling the display picture. As I can see no body had tried to use the display picture in their apps..
Developer
Posts: 1,008
Registered: ‎12-12-2010
My Device: Passport (Red Limited Edition)
My Carrier: Mobile Vikings

Re: BBM ERROR FOR CONTACT PICTURE REQUEST

Did you import the BBM platform library?

-------------------------------------------
BlackBerry Certified Builder for Native Application Development -- Proud member of the Belgian BlackBerry Developer group
Samples: Park in Ghent
Feeling generous? Nominate me for BB Elite member!
Contributor
Posts: 33
Registered: ‎01-02-2012
My Device: 9900
My Carrier: bell

Re: BBM ERROR FOR CONTACT PICTURE REQUEST

Yes I did import library, name space and also included it in the .pro folder