We all know that Microsoft has taken a leaf out of Apple’s book with their attempts to tie down the hardware specs for Windows Phone 7. It can be argued whether this is a good thing or not for users, but it certainly makes life easier for us developers. We know we can target a minimum common platform and know that our software should run the same way on all devices…
Well that is the theory anyway!
Unfortunately the reality is slightly different. There are still subtle differences between devices that developers need to be aware of.
The Super AMOLED problem
Samsung has come to market with its very impressive Super AMOLED screens in the Focus and the Omnia 7. Unfortunately these screens have rather different display characteristics than normal LED screens. In particular they have a real problem with colour gradients. They exhibit very bad colour banding. MobileTechWorld.com has posted a comparison with of the same image displayed on a LG Optimus 7 (left) and a Samsung Omnia 7 (right).
You can see that the Omnia 7 (right) looks very different. It exhibits rather bad colour banding and even has a different hue altogether – it looks more purple than blue.
I have just run foul of this problem when testing one of my apps on an Omnia 7. At first I thought it was a problem with the image file I was using but it looks this is just a general problem with AMOLED screens in general (including on Android). My problem was not quite as bad as the example above but it was still noticeable and off putting.
The problem here is actually to do with the fact that the screen is 16-bit. All of the 16-bit screens have this problem to some – its just that it is dramatically more apparent on the SuperAMOLED screens than on others.
There are two points that come out of this for developers:
1) Avoid images with gradients in your apps. They won’t show up well on AMOLED screens. If you must use a gradient in an image you can try and use a dithering function to smooth over the gradient, sometimes this can help. But my advice is that you’re better off steering clear of them altogether if you can.
2) Don’t be lulled in to a false sense of security in thinking that all Windows Phone 7 devices are equivalent. They are not. Test your apps on as many devices as you possibly can before releasing it or showing it to clients. It is not the case that your app will necessarily look the same on all devices.
The simple truth is that however much Microsoft tries to constrain the hardware these kinds of variations are inevitable. It is the curse of smartphone development as Android developers well know and now with some 7 iOS devices (11 if you count discontinued hardware) some iPhone dev’s are now beginning to it feel too.
There is a way you can test for this to some degree using the emulator. By default the emulator runs with a 32-bit color depth, but this can be changed by changing the following:
C:\Program Files (x86)\Microsoft XDE\1.0\WM7_Skin.xml
Problems with any images or colors will now become more apparent.