Thanks to those of you that attended Reed and my presentation at the Windows Mobile Partner Summit. As promised, here is the PowerShell Script used in the demo. Click Here.
Here is a quick summary of the purpose of this script and how to run it.
Adapt your App: As you know, WM Professional now supports five different screen resolutions and three different DPIs. WM Standard supports two different screen resolutions and two different DPIs. (more info) Professional also supports dynamic screen rotation. The types of screens supported will very likely change in the future. Case in point: the HTC s720 (Standard) is the first Standard device to support dynamic screen rotation!
So how can you quickly test your application on several different screen types simultaneously? You can leverage the Device Emulator Manager or the CoreCon .NET Class: Microsoft.SmartDevices.Connectivity, to test the application. The script here uses the later. For an exhaustive and informative discussion of the Device Emulator Manager, check out Jim Wilson's MSDN article here.
1. The script simply loads three emulator types:
240 x 320 @ 96 DPI, 480 x 640 @ 192 DPI (VGA), and 240 x 240 @ 96 DPI (Square)
I chose these to give good representation of the major screen types available. You could load more, but keep in mind each emulator image takes about 250 MB to load.
2. The script then waits for each image to connect and then copies the executable from the desktop to the emulator.
3. The script then launches the application on the emulator.
4. After the application launches, try pressing the Calendar button to invoke the screen rotation.
How does your app look? How can you fix it? Another great Jim Wilson blog post can help here.
Can you tell why this application does not display properly in the VGA emulator? (The source code can be found in the sample PocketOutlookSample that ships with the WM6 SDK.)
To use this script you will need:
To run the script, from the command line:
powershell .\emulator.ps1 [DeviceTargetDirectory\ApplicationName.exe]
the device application should be in the same directory as the script.
Thanks Loke Uei Tan for the inspiration here.