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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Contributor
Posts: 5
Registered: ‎11-08-2012
My Device: BB10 Dev Alpha
My Carrier: Vodafone

Re: Does anyone know how to get BB10's OS version, Phone number and Carrier information through API?

Hi noahhuang

 

Apologies, it seems that I should know better than to rely on documentation Smiley Happy

 

It looks like the APIs don't contain the infomation you are after, I expect this has probably not yet been implemented in the beta OS.  For example, when I queried the HardwareInfo API, I got the following (on BB10 Alpha runnning 10.0.9.388):

 

Debug: "deviceName = "
Debug: "pin = 0x29d8d418"
Debug: "serialNumber = 0000000000070207592863"
Debug: "imei = 004402241636145"
Debug: "meid = "
Debug: "hardwareId = "

 

The APIs are probably correct, and you should check again when RIM provide another firmware release.

 

Developer
Posts: 100
Registered: ‎10-01-2012
My Device: BB10 Dev Alpha
My Carrier: Roger

Re: Does anyone know how to get BB10's OS version, Phone number and Carrier information through API?

Hi,

 

Thank you.

 

Actually, I has all those codes in my application, but just can not get the information from the API. I am not sure the reason is it's a alpha device or another.

 

But I reallly appreciate your help.

 

 

Noha

 

 

New Contributor
Posts: 5
Registered: ‎11-08-2012
My Device: BB10 Dev Alpha
My Carrier: Vodafone

Re: Does anyone know how to get BB10's OS version, Phone number and Carrier information through API?

If you cannot see *any* information at all from the APIs, check that you have the required permissions set in your project.  You'll need read_device_identifying_information for the handset information and read_cellular_data for SIM/network.

 

Developer
Posts: 100
Registered: ‎10-01-2012
My Device: BB10 Dev Alpha
My Carrier: Roger

Re: Does anyone know how to get BB10's OS version, Phone number and Carrier information through API?

Yes,  I am very sure I checked all the permissions.

Developer
Posts: 100
Registered: ‎10-01-2012
My Device: BB10 Dev Alpha
My Carrier: Roger

Re: Does anyone know how to get BB10's OS version, Phone number and Carrier information through API?

[ Edited ]

Here is my code:

data.insert("carrier", QString("%1:%2").arg(m_Env->sim->mobileCountryCode()).arg(m_Env->sim->mobileNetworkCode()));

 

Here is the result: 

"carrier":null,

 

------------

data.insert("phoneNumber", m_Env->phone.activeLine().address());

 

Here is the result:

"phoneNumber":null

 

Has any wrong in my codes?

Developer
Posts: 100
Registered: ‎10-01-2012
My Device: BB10 Dev Alpha
My Carrier: Roger

Re: Does anyone know how to get BB10's OS version, Phone number and Carrier information through API?

data.insert("carrier", QString("%1:%2").arg(SimCardInfo(this).mobileCountryCode()).arg(SimCardInfo(this).mobileNetworkCode()));
data.insert("phoneNumber", bb::system:Smiley Tonguehone(this).activeLine().address());

 

Same result:

 

"carrier":null,

"phoneNumber":null

Developer
Posts: 134
Registered: ‎08-03-2011
My Device: torch, Z10
My Carrier: Vodafone, Airtel

Re: Does anyone know how to get BB10's OS version, Phone number and Carrier information through API?

for os version

https://developer.blackberry.com/native/reference/cascades/bb__platform__platforminfo.html

bb:Smiley Tonguelatform:Smiley TonguelatformInfo p_info;
p_info.osVersion();
-----------------------------------------------------------------------
"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
-----------------------------------------------------------------------
Developer
Posts: 61
Registered: ‎10-16-2013
My Device: Z10
My Carrier: vodaphone

Re: Does anyone know how to get BB10's OS version, Phone number and Carrier information through API?

What about the OS version.. how to get hold of the same?

Developer
Posts: 61
Registered: ‎10-16-2013
My Device: Z10
My Carrier: vodaphone

Re: Does anyone know how to get BB10's OS version, Phone number and Carrier information through API?

sorry got! didnt see brijesh's post! thanks a lot!! Smiley Happy

Highlighted
Developer
Posts: 134
Registered: ‎08-03-2011
My Device: torch, Z10
My Carrier: Vodafone, Airtel

Re: Does anyone know how to get BB10's OS version, Phone number and Carrier information through API?

hi cmr1900,

If your issue is resolved then "Accept as Solution"

thanks in advance
-----------------------------------------------------------------------
"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
-----------------------------------------------------------------------