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.
07-01-2013 07:02 PM
Those of you who have BlackBerry Q5 and Q10, could you please compile & run this small app on your device: https://l-homes.org/~leppa/bb10/dpi.zip, and post the numbers it displays?
It will display screen resolution as reported by bb::device:isplayInfo class and calculate DPI from these values. I only have Z10 but I need to know what are these values on other devices.
Thank you all in advance for your help.
Solved! Go to Solution.
07-01-2013 10:38 PM
07-02-2013 09:44 AM - edited 07-02-2013 09:47 AM
No real need to run an app to find that... read this page. (And, if you haven't seen that document before, read the whole thing! :-) )
Unfortunately, values reported by bb::device:isplayInfo are different from the ones declared on that page. On Z10 it reports 14222.2 pixels per meter (~361 DPI) horizontal and 14065.9 pixel per meter (~357 DPI) vertical resolution, both of which are closer to 360 when you round to the nearest 5 (while 356 is closer to 355). That's why I need to know real values that are reported by the device (knowing whether they're the same accross one model would also be nice).
07-02-2013 10:01 AM
07-02-2013 10:26 AM
Ah, that old screwup. I had hoped they would have fixed that by now...
Does your code check both dimensions separately? At one point I was getting different results from the vertical axis than the horizontal. When I used height it gave results within one unit of the documented size, whereas width was off.
Yes, it reports different values for horizontal and vertical DPI. So I calculate average of vertical and horizontal to get effective DPI value.
I made a mistake in my previous post: 357 rounds to 355. The same as 356, declared in documentation, does. So vertical resolution is, indeed, closer to the documented value than horizontal one.
I see that you also have Z10. I wonder if this situation is the same on square Q5/Q10...
07-05-2013 02:57 PM
Here's the result from a Dev Alpha C, which is supposed to be identical hardware to the Q10:
resolution 13090.9091796875 13090.9091796875
pixelSize 720 720
physicalSize 55 55
That's the output of those three DisplayInfo properties, from a QML file (not using your own code).
Hope that helps!
07-05-2013 03:51 PM
resolution 13090.9091796875 13090.9091796875
Thanks a lot. Again, ~332.5 DPI is closer to 335 when you round to the nearest 5, but at least horizontal and vertical values are equal.
Considering that Q10 and Q5 have the same screen size and pixel resolution, I will assume that values they report are the same too.
07-05-2013 04:20 PM
07-09-2013 08:44 AM
I've ported an app which was available on Nokia N9 and Symbian phones and used BB10 port of Symbian Qt Components. The way they work is that they load different layout (margins, icon sizes, etc.) depending on device DPI rounded to the nearest 5. The guy who ported these components created layout only for Z10 and I decided to add Q10 and Q5 layouts. So it doesn't matter to me if the reported values are off if I already know how off are they. The main problem is getting to know this difference.
One of the solutions might be to ship the same layout three times: for DPI, DPI+5 and DPI-5 and hope that the reported values won't be off by more than 5 points from the decalred ones.
Anyway, one more person (who has Q10) sent me the values and they're exactly the same as you posted. As nobody else replied, I'll accept your answer as solution. Thank you.