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
Developer
Posts: 188
Registered: ‎04-07-2013
My Device: BlackBerry Z10
My Carrier: Telus
Accepted Solution

BBM Social Platform Problem

[ Edited ]
const QString filePath=QDir::currentPath()+"/app/native/assets/images/bbm.png";

QFile file(filePath);
if (!file.open(QIODevice::ReadOnly))
    return;

const QByteArray imageData = file.readAll();
bool success=userProfile->requestUpdateDisplayPicture(bb::platform::bbm::ImageType::Png, imageData);//Always returns FALSE

 The code below always fail to update the bbm display picture, I dont know what is wrong

 

1. BBM Permission is granted

2. File path is valid.

3. File is successfully opened/read.

 

The code below is how I initialized the userProfile and RegistrationHandler in the constructor.

 

// Register with BBM.
registrationHandler = new RegistrationHandler(uuid, app);

userProfile = new UserProfile(&registrationHandler->context(), this);

 

Also, I dont know if this is relevant or not, but the RegistrationHandler.cpp was copied from here. RegistrationHandler .

Here is the RegistrationHandler.cpp file

 

I really need your help guys, thank you.

 

 

PS: I also cannot retrieve the BBM displayName, statusMessage, personalMessage using the UserProfile object

jayvdiyk.com
Developer
Posts: 188
Registered: ‎04-07-2013
My Device: BlackBerry Z10
My Carrier: Telus

Re: BBM Social Platform Problem

[ Edited ]

Anyone please

jayvdiyk.com
Developer
Posts: 188
Registered: ‎04-07-2013
My Device: BlackBerry Z10
My Carrier: Telus

Re: BBM Social Platform Problem

Anyone please? I have been banging against the wall for a few days now
jayvdiyk.com
BlackBerry Development Advisor
Posts: 15,724
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: BBM Social Platform Problem

What is the registration status?  Does the application successfully register with the BBM SP?  Are you prompted to allow the update to the avatar image?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 188
Registered: ‎04-07-2013
My Device: BlackBerry Z10
My Carrier: Telus

Re: BBM Social Platform Problem


Thank you for your reply..

My application has successfully connected to the BBM.
(I got the toast saying that).

And no, I am not prompted at all to update my displaypicture or personal message.

jayvdiyk.com
BlackBerry Development Advisor
Posts: 15,724
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: BBM Social Platform Problem

Try running the sample here:  bbmprofile

 

Are you able to set a personal message using it?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker