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

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.

Developer
Posts: 16,575
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

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
Contributor
Posts: 48
Registered: ‎08-07-2013
My Device: z10

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

hi,

 

     Why can't use device screen sizes to categorize them

Developer
Posts: 84
Registered: ‎04-22-2013
My Device: BB 10 Dev

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?

Developer
Posts: 16,575
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

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
Regular Contributor
Posts: 56
Registered: ‎06-25-2012
My Device: non-blackberry user

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 !!

Developer
Posts: 120
Registered: ‎03-13-2012
My Device: Playbook, Dev Alpha C, Q10, Z10, Z30

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.