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

Reply
Contributor
Posts: 22
Registered: ‎03-01-2010
My Device: Z10
My Carrier: Bell Canada
Accepted Solution

How to get device model name?

Hi, 

 

Is there a way to get the device name in bps (i.e. Z10, Q10, Q5 etc)? I can see he OS Version, serial #, PIN etc in the deviceinfo, but not the device name.

 

Thanks! 

vps
New Contributor
Posts: 4
Registered: ‎06-15-2013
My Device: Playbook
My Carrier: Vf

Re: How to get device model name?

Contributor
Posts: 22
Registered: ‎03-01-2010
My Device: Z10
My Carrier: Bell Canada

Re: How to get device model name?

Got it, thanks!

New Developer
Posts: 12
Registered: ‎06-17-2013
My Device: Blackberry 9800
My Carrier: Reliance

Re: How to get device model name?

thanks, I am just looking for this api....

Thanks & Regards,
Nitish
Blackberry and PhoneGap Developer

------------------------------------------------------------------------------------------------
- If a post contains the solution to the problem, please click "Accept as Solution"
- If a post contains helpful content, please give it a "Thumbs Up"
New Developer
Posts: 17
Registered: ‎04-14-2013
My Device: Simulator
My Carrier: Simulator

Re: How to get device model name?

[ Edited ]

 

The solution only works in a Cascades app. I'm writting a native GL app and using BPS only. I can't compile QT in a native app due to the requirement of needing to use qmake. You can't mix QT and native code that starts with int main()...

 

EDIT : Apparently deviceinfo_details_get_hardware_id returns a hex string sort of like

 

0x85002a0a which represents the ID for Q5. Now it's a matter of googling the right IDs and connecting them to the names.

--------------------------------------------------------------------------
www.facebook.com/relativegames - My Apps