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

Web and WebWorks Development

Reply
Contributor
lauvot
Posts: 23
Registered: ‎01-01-2013
My Device: BlackBerry Dev Alpha B
My Carrier: airtel

blackberry.user.identity not working

Hi,

 

I am unable to get the blackberry user identity information, I have followed the steps mentioned in the below link
http://blackberry-webworks.github.com/WebWorks-API-Docs/WebWorks-API-Docs-next-bbid/view/blackberry....

 

It is failing on the below call, thereafter nothing works, it seems it hangs on this call and do not return, I have put alert just after this call but that never shows up

blackberry.user.identity.registerProvider("ids:rim:bbid");

 

please let me know for any solutions

 

Thanks,

 

Please use plain text.
Developer
interfaSys
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: blackberry.user.identity not working

Did you add the permission to config.xml?

Are you sure that WebWorks has been loaded before making use of the BB API?

--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Please use plain text.
Contributor
lauvot
Posts: 23
Registered: ‎01-01-2013
My Device: BlackBerry Dev Alpha B
My Carrier: airtel

Re: blackberry.user.identity not working

Thanks Olivier for the response

 

Yes, I have added the permission. I have added the below 2 lines as suggested in the link mentioned in my previous post.

<feature id="blackberry.user.identity" />

<rim:smileytongue:ermissions>
<rim:smileytongue:ermit>access_bbid_pii</rim:smileytongue:ermit> 
</rim:smileytongue:ermissions>



Are you sure that WebWorks has been loaded before making use of the BB API?
Yes, the BB API has been called after loading the webworks.
 
 window.addEventListener("load", function(e) {
          console.log("load()");
          document.addEventListener("webworksready", ready);
          }, false);
 
and user identity related code is in 'ready' function
 
thanks,
Please use plain text.
Developer
interfaSys
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: blackberry.user.identity not working

:smileysad:

Does blackberry.user.identity.getVersion() work? If it does, then it might be worth filing a bug report.

You're using a real device, correct?
--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Please use plain text.
Contributor
lauvot
Posts: 23
Registered: ‎01-01-2013
My Device: BlackBerry Dev Alpha B
My Carrier: airtel

Re: blackberry.user.identity not working

var version = blackberry.user.identity.getVersion();
 
alert(version);
 
Still the same problem, it hangs on getVersion, alert does not show up.

I am using Dev Alpha B device
 
Please use plain text.