I don't have experience on the desktop monitor results, but from my
understanding with mobile the dpi information is returned directly from
the OS on the device. It's known that some devices return improper info,
which I've heard is a result of the OS, not AIR.
For me the information that is returned works well enough to scale
content properly for my mobile apps. I suppose if you have a more
detailed use case, it could be a problem.
Brent
On 2/28/12 1:40 PM, Erik Lundgren wrote:
28 feb 2012 kl. 20.46 skrev Brent Arnold:
What information would you need that's not already included in the Capabilities
class? Right now with Flash and AIR we can get access to screenDPI,
screenResolutionX/Y, as well as color depth information.
I believe the Capabilities.screenDPI doesn't query the OS for all that the os
knows.
On the desktop the Capabilities.screenDPI property will always return the
abstract ppi, not the actual ppis of the displays connected to the pc. On mac
you will always get the return value 72. On windows – I'm not sure – but I
would imagine it returns 96 (or the custom dpi set by the user in the
control-panel). Or maybe the player will return 72 on windows as well. The
point is. You won't get the value you are looking for.
There seems to be multiple issues with mobile devices returning the the wrong
screen values. Maybe this can't be queried correctly by native code either, but
maybe it can.
There is no reliable way of getting this information in Flex at the present.
There is no reliable way to draw real world measured elements in flex.
Yours
/Erik