02-06-2013 07:01 AM
All the methods related to screen size returns NaN
trace(qnx.system.Device.device.screenWidth);
trace(qnx.system.Device.device.screenHeight);
trace(qnx.system.Device.device.screenDiagonal);
Have I to do anything to got those values?
02-06-2013 08:12 AM
i used this code & i am getting 3.6 & 2.2 for height & width respectively.
Have you given permission
<permission>read_device_identifying_information</permission>
02-07-2013 03:17 PM
yes, I have that permission.
I'm testing with simulator, it should work shouldn't it?
02-08-2013 12:38 AM
Ok..
i have'nt test it on simulator. it BB alpha device it is displaying its values in inches.
As this API checks the hardware detail so may be its restricted in simulator.
02-08-2013 03:09 AM
Thank you man! that's probably the problem.
02-13-2013 02:29 AM
02-13-2013 05:14 AM - edited 02-13-2013 05:14 AM
This works for me on a Dev Alpha:
trace("display width is: " + Display.display.getDisplayWidth(0).toString());
trace("display height is: " + Display.display.getDisplayHeight(0).toString());
02-13-2013 05:19 AM - edited 02-13-2013 05:22 AM
You can also make use of:
import flash.system.Capabilities;
trace("screenDPI is: " + Capabilities.screenDPI.toString());
trace("screenResolutionX is: " + Capabilities.screenResolutionX.toString());
trace("screenResolutionY is: " + Capabilities.screenResolutionY.toString());
02-13-2013 05:49 AM