04-11-2013 03:34 AM - edited 04-11-2013 03:57 AM
const QString filePath=QDir::currentPath()+"/app/native/assets/i
mages/bbm.png"; QFile file(filePath); if (!file.open(QIODevice::ReadOnly)) return; const QByteArray imageData = file.readAll(); bool success=userProfile->requestUpdateDisplayPicture(bb::platform::bbm::I mageType::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(®istrationHandler->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
Solved! Go to Solution.
04-15-2013 04:24 PM
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?
04-17-2013 05:09 AM
04-17-2013 01:41 PM