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
Posts: 22
Registered: ‎09-01-2010
My Device: Blackberry 8900
My Carrier: Tigo Honduras

Blackberry Phone Number from widget

Hello everyone,

 

This is my first post, I've been looking around and haven't been able to find any answer, I want to get the blackberry's phone number from a widget I have been trying with this code, but I'm not sure if it's really possible:

 

<script type="text/javascript">
    var lines = blackberry.identity.phone.getLineIds();
    for (var i = 0; i < lines.length -1; i++)
    {
        alert("Line id : " + lines[i] + " has phone number : " + blackberry.identity.phone.getLineNumber(lines[i]));
    }
</script>

 

I've already added Invoke.identity and Invoke.identity.phone to the xml file.

I've tried on simulators and on a real divice (Blackberry 9700).

 

Thanks in advance.