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
Developer
Posts: 46
Registered: ‎02-22-2012
My Device: Developer
My Carrier: Various

bbm UserProfile::displayName() returns empty string

 

As per title:

The UserProfile object, displayName() method decides to return a blank/empty string for the device Users display name.

 

Tried calling

i) immediately after bbm registration completes sucessfully

ii) before registration starts

iii) long after registration completes + after a profile box item been added

 

We are assuming the 'displayName()' that is supposed to be returned is the same as the field titled 'Screen name'  in the Blackberry ID Settings page. If not what API returns the 'screen name'...

 

Any magic runes for this 'feature' to work ?

BlackBerry Development Advisor
Posts: 15,727
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: bbm UserProfile::displayName() returns empty string

It returns the display name the user has set in their BBM profile.  To see it open the BBM Client and look in the blue bar at the top of the screen.

 

Here's an example that shows how to get it:  bbmprofile

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
Developer
Posts: 46
Registered: ‎02-22-2012
My Device: Developer
My Carrier: Various

Re: bbm UserProfile::displayName() returns empty string

For what its worth you appear to have to do the following:

 

Wait until the registration has sucessfully completed BEFORE creating the actual UserProfile object.

 

I.e. wait until after the registrationStateUpdated() signal calls your slot with the "RegistrationState::Allowed" status. in your app before creating the object.

 

Would be a bit more useful if the docs gave some clue on this type of dependancy...

 

FWIW 2

The displayName() is not the same as the 'Screen name', rather its the name displayed at the top of your bbm app which looks like your combined First + Surnames.....