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
New Contributor
jimseiwert
Posts: 3
Registered: ‎04-22-2013
My Device: z10

Webworks get users phone number

I am trying to get the users phone number for an application we are building. I have been trying to use the below sample I found on the API documentation. Every time I run it I get the following error "Uncaught TypeError: Cannot call method 'getLineIds' of undefined"

 

 

 

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]));
}
alert("Done");

 

 

 

I have the following in my config file 

 

<feature id="blackberry.app">
<!--<param name="orientation" value="portrait" />-->
</feature>
<feature id="blackberry.app" />
<feature id="blackberry.push" />
<feature id="blackberry.system" />
<feature id="blackberry.identity" />
<feature id="blackberry.identity.phone" />
<feature id="blackberry.invoked" />
<feature id="blackberry.ui.dialog" />
<feature id="blackberry.ui.toast" />

 

Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: Webworks get users phone number

According to the docs that call is only supported on BB5-7




Click the like button if you find my posts useful!
Please use plain text.
New Contributor
jimseiwert
Posts: 3
Registered: ‎04-22-2013
My Device: z10

Re: Webworks get users phone number

I saw two docs, one said it is and one that it is not.

Is this functionality removed now from 10?
Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: Webworks get users phone number

They won't have removed it, it'll never have been there in the first place

 

Looking at the NDK docs there are some libraries dealing with phone stuff on the Cascades side so although seemingly possible we ain't got it yet.




Click the like button if you find my posts useful!
Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: Webworks get users phone number

Silly question

 

How does your app know a call is in progress?

 




Click the like button if you find my posts useful!
Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: Webworks get users phone number

Please see this post so I know what people want




Click the like button if you find my posts useful!
Please use plain text.
New Contributor
jimseiwert
Posts: 3
Registered: ‎04-22-2013
My Device: z10

Re: Webworks get users phone number

I am not sure what you mean "so you know what people want". Please explain.

I also don't know if a call is in progress. I want the device phone number
Please use plain text.