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
Posts: 2
Registered: ‎12-16-2010
My Device: Torch
Accepted Solution

Is there a way to get the BlackBerry's owner phone number at BlackBerry Browser?

We are trying to identify the user by their BlackBerry phone number in a Java web application running on a WebSphere Application Server version 6.1 (JDK5.0). The BlackBerry users access the application through BlackBerry Browser. Is it possible to get the owner's phone number with JavaScript kind code and pass the phone number back to the Web server? Has anyone done this kind of programming?

 

We are using BlackBerry Torch and Curve.

 

Thank you in advance. 

Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Is there a way to get the BlackBerry's owner phone number at BlackBerry Browser?

It is not possible to read a user's phone number from the BlackBerry browser application.  There are no JavaScript objects available in the context of the browser that allows a web site to access this type of information (nor does the browser expose this info).

 

However, when embedding a browser object in a Java application (e.g. using the WebWorks framework, or building a hybrid Java-Web app from scratch), you do have the ability to access the necessary Phone APIs that would allow you to read the active phone number.

 

A suggestion would be to create a BlackBerry application using the WebWorks platform, that loads your JSP page.  Your users would then install and use this client on their BlackBerry (instead of accessing the content through the browser), and you can then make use of device APIs such as the Phone API to add the necessary functionality to your application.

 

Sincerely,

Adam

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
New Contributor
Posts: 2
Registered: ‎12-16-2010
My Device: Torch

Re: Is there a way to get the BlackBerry's owner phone number at BlackBerry Browser?

Thank you, Adam, for your response. I appreciate it.