11-21-2009 12:08 AM
Hi,
I am writing an application that supports OS level 4.5. When I run it in simulator for 9530 and OS 4.7 it acts very strangely. In my app during initialization I determine the width and height of the display and layout items accordingly. However, when I query Display.getWidth() and Display.getHeight() the returned result is 320x240!
I thought this could be a problem with my simulator installation so I signed and tried it on my Storm 9530 and I got the same results there. If I compile with 4.7 the problem goes away.
I need to stick with 4.5 though. Anybody seen anythign like this?
Thanks in advance...
Solved! Go to Solution.
11-21-2009 12:53 AM
It gives you that resolution because it is in compatibility mode
11-21-2009 10:15 AM - last edited on 11-21-2009 10:49 AM
Ahh...
So how else would I query the true pixel resolution of the current device? Is there any other API?
Also, this does not happen when I run in 9630 or any other high res devices. For all other high res models I get true 480x360 returned by the API. Only in 9530 I am experiencing this. I would assume that if this was intended behavior it would be consistent across different devices. Am I wrong assuming this?
Upon further investigation now I know that if the API DeviceInfo.getDeviceName() returns 9500, the returned resolution is always 320x240. This happens for 9530 simulator as well as 9500 simulators as well as my 9530 Device. For all other devices with high resolution the Display resolution returned are correct.
11-21-2009 11:39 AM - last edited on 11-21-2009 11:40 AM
I think the point that you are missing is that these other devices have a keyboard, where the 95xx does not. Consequently, the OS has to provide an environment where the application will be usable, and it does this by providing a virtual keyboard, which consumes the remainder of the screen.
Have you tried disabling compatibility mode? You can do this in Options on the device (in Applications), and it can also be disabled in the JAD file parameters for OTA download.
Search the forum for "compatibility mode" and you will find many, many discussions about this feature, as well as ways to work around it.
Having said all of this, my advice is to go ahead and have a 4.7 build for your app. If your application has any kind of UI at all, your users will not be very happy with Compatibility mode on the touch-sceen devices.