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
Developer
jessica99327
Posts: 84
Registered: ‎04-22-2013
My Device: BB 10 Dev
My Carrier: Simulator

How to detect whether it is a phone or tablet

Hi all,

From the hardware info, I'm able to get the device model number, serial  number, etc....

So how can I detect whether the device is a smart phone or tablet, is there any indicator other than comparing the device model?

 

Thanks in advance.

Please use plain text.
Developer
simon_hain
Posts: 15,872
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: How to detect whether it is a phone or tablet

so far no, i don't think so. but as there are no tablets with bb10 you can be pretty sure it is a phone :smileyhappy:
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Contributor
tnavabothu
Posts: 48
Registered: ‎08-07-2013
My Device: z10
My Carrier: blackberry

Re: How to detect whether it is a phone or tablet

hi,

 

     Why can't use device screen sizes to categorize them

Please use plain text.
Developer
jessica99327
Posts: 84
Registered: ‎04-22-2013
My Device: BB 10 Dev
My Carrier: Simulator

Re: How to detect whether it is a phone or tablet

hmm isn't playbook categorized as a tablet?

 

I've thought of using the screen size to determine but I'm afraid what if BB release some kind of a smaller version of playbook like iPad mini? or do they specify the minimum screen width/height for a tablet?

Please use plain text.
Developer
simon_hain
Posts: 15,872
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: How to detect whether it is a phone or tablet

the playbook is a tablet, but it does not have bb10 (nor will it ever get it).

i don't think BlackBerry is going to release a new tablet any time soon, the playbook was not really a commercial success.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Regular Contributor
coolneo
Posts: 56
Registered: ‎06-25-2012
My Device: non-blackberry user
My Carrier: Airtel

Re: How to detect whether it is a phone or tablet

The answer has been already given in one of the posts above i think the only difference between tablet and phone at present is the size , based on the size you present the user different ui components !!

 

So you can make your own utility based on size to consider it as a phone or a tablet !!

Please use plain text.
Developer
mmd12
Posts: 112
Registered: ‎03-13-2012
My Device: Playbook, Dev Alpha C, Q10, Z10
My Carrier: T-Mobile

Re: How to detect whether it is a phone or tablet

The PlayBook's screen size is 1024x600.

 

Yes, if you're using the 10.2 (or any 10.x) compiler, you're app will not run on the PlayBook.

 

If you're using the Native PlayBook compiler (currently 2.1) you're app will generally run on the BB10 phones.  I'm sure there are other differences, but for me, it was screen sizes and dialog boxes that I had to change for my apps.

Please use plain text.