Mobile Corner
A Lap Around the Windows Phone 8 SDK
Nick Randolph looks at the tools that make up the new Windows Phone 8 SDK.
- By Nick Randolph
- 11/28/2012
Since Windows Phone 8 SDK is now available for download, you can start upgrading or developing new applications for Windows Phone 8. What you may not fully appreciate is just how significant Windows Phone 8 is, mainly as a result of the change to using the same core as Windows 8. In this article we're going to take a quick run through the tools that come with the SDK. If you've worked with Window Phone in the past, some of these will be familiar; others will be new.
Souped-Up Emulators
One significant change in the Windows Phone 8 SDK is that the emulators now run on Hyper-V. As per previous versions of the SDK, the emulators are an actual Windows Phone image, which means they behave similar to a real device. Of course, this doesn't negate the need to test your applications on real devices, as there will always be subtle differences for which you'll want to account.
Figure 1 illustrates the device selection drop-down located in the Standard toolbar in Visual Studio. In this case, all six emulator images are visible, which includes the WP7.1 emulators since this is for a Windows Phone 7.1 application. For Windows Phone 8, you'll only see the four Windows Phone 8 emulator images, representing different screen resolutions and memory capacity.
[Click on image for larger view.] |
Figure 1. Selecting a deployment device. |
When you select a Windows Phone 8 emulator and deploy your application, you'll see the emulator start up as if it were a real device booting. In fact, what's really nice about the Windows Phone 8 emulators is that they include all the built-in applications (the Windows Phone 7 emulators were all restricted to just Internet Explorer, Settings and applications you deployed). Figure 2 illustrates one of the Windows Phone 8, emulators showing the new small live tiles and the Additional Tools window.
[Click on image for larger view.] |
Figure 2. The Windows Phone 8 Emulator and Additional Tools. |
The Additional Tools window includes the Accelerometer, Location and Screenshot tools that we've had in the past; but it now also includes a Network tab.
This is useful for diagnosing networking issues or for debugging networking traffic on the emulator. If the emulator doesn't appear to be connecting to the Internet, for example, you can check this tab to ensure the emulator has a valid IP address assigned to it. You can also use traffic-monitoring tools such as Wireshark to monitor networking traffic from the emulator.
While the emulator includes the standard applications and even allows you to add accounts, some areas are still hard to test. For example, because the emulator piggybacks on the host computer's network connection, it's hard to diagnose connection-related issues. Mobile devices often move in and out of good network coverage, resulting in applications becoming laggy, not responding or crashing.
Simulation Dashboard
The Windows Phone 8 SDK includes a new Simulation Dashboard (accessible from the Tools menu, and shown in Figure 3) that allows you to adjust the network quality. You can vary both the speed and signal strength to ensure that your application continues to operate correctly.
[Click on image for larger view.] |
Figure 3. The Simulation Dashboard. |
The Simulation Dashboard also lets you test your application's behavior when the lock screen's triggered, and how it resumes when the lock screen's dismissed. You can also test how your application or game reacts when obscured by a reminder. This is perhaps more important for an interactive game which might be paused while the user deals with an interruption.
Certification Submission
As you prepare to submit your application for certification, make use of the Store Test Kit (the Marketplace Test Kit in previous SDK versions). Figure 4 shows the three areas covered by the test kit. Application Details ensures you have all the necessary images, such as icons and splashscreen images, you're going to need during the submission process.
The Automated Tests ensure your application's correctly packaged and that it meets some of the baseline performance metrics required by the Store; for example, application startup time.
[Click on image for larger view.] |
Figure 4. The Windows Store Test Kit. |
Lastly, the Manual Tests are a recommended set of tests you should run through to make sure your application adheres to all Store policies. Successfully completing these tests results in a higher probability that your application will be certified the first time you submit it.
New Tools
As per previous versions, the SDK ships with a couple of additional tools that can assist in debugging. Figure 5 shows the Windows Phone Developer Registration tool (left) and the Application Deployment tool.
[Click on image for larger view.] |
Figure 5. Registration and deployment tools. |
The Registration tool allows you to unlock your Windows Phone devices so you can deploy applications for testing. For Windows Phone 7.1 devices, you'll still need Zune installed and running in order to connect to the device.
For Windows Phone 8 devices you'll notice that when you plug your device in, a Windows Phone application will launch, allowing you to synchronize content with your device. Once connect and registered, you can use the Application Deployment tool, or Visual Studio, to deploy applications.
One of the challenges with building Windows Phone applications is ensuring the application performs well and doesn't consume large amounts resources, such as network bandwidth and battery life. The Application Analysis tool, shown in Figure 6, still includes execution and memory profiling. The new SDK adds a monitoring option that summarizes network usage, estimated battery consumption and memory consumption over time.
[Click on image for larger view.] |
Figure 6. Application analysis. |
This information can then be used to tweak themes (darker themes will use less battery to illuminate the screen), caching (reducing network bandwidth) and other application performance aspects.
While most of the tools covered here aren't new, they've been upgraded to work with Windows Phone 8, and include additional features that make your job easier. Even if you're still building Windows Phone 7 applications, I'd encourage you to start using the new SDK; it'll make you more productive.
About the Author
Nick Randolph runs Built to Roam, a consulting company that specializes in training, mentoring and assisting other companies build mobile applications. With a heritage in rich client applications for both the desktop and a variety of mobile platforms, Nick currently presents, writes and educates on the Windows Phone platform.