(X) Hide this
    • Login
    • Join
      • Generate New Image
        By clicking 'Register' you accept the terms of use .

Windows Phone 8: Developer Tools

(5 votes)
Peter Kuhn
>
Peter Kuhn
Joined Jan 05, 2011
Articles:   44
Comments:   29
More Articles
1 comments   /   posted on Dec 10, 2012
Categories:   Windows Phone
Tweet

In the last part of the series [1], we talked about the new screen resolutions that have been introduced with Windows Phone 8. This is one of the features not only exciting for end users, but also important to learn about for developers. However, one thing we didn't see was how the development eco system enables you to actually test your apps with these different device features. Time to get our hands on the improved developer tools.

What's in the SDK

When you download the SDK from the Windows Phone Dev Center [2], you get a whole set of tools. The core of the SDK itself integrates nicely with existing installations of Visual Studio 2012 (Professional, Premium, Ultimate) and provides application templates as well as the required libraries. It also will install a separate Express edition of Visual Studio if you don't have an existing version on your computer – all in all, nothing new there.

However, in addition to that the SDK will also provide you with different emulators, test kits, the phone profiler and a new tool named the simulation dashboard, all of which we will take a look at now.

Emulators

In Windows Phone 7, we first only had one single emulator that ran your apps on a simulated WVGA 512MB device. At some point, Microsoft introduced support for lower end devices with only 256MB of RAM, for example the Nokia Lumia 610. The corresponding update of the SDK to version 7.1.1 consequently added a second emulator image that allows you to test your applications against these lower specs [3]. With the Windows Phone 8 SDK we now have four emulators at hand:

As you can see, we still have WVGA versions, but this time in 1024MB and 512MB flavors (for Windows Phone 8, no 256MB devices will be available). In addition to that we also have the ability to test on the new high-resolution devices now: WXGA (1280x768) and HD 720p (1280x720). You can leave multiple emulators running in parallel, however Visual Studio can only connect to one of them at the same time. One important detail is that you can only use these emulators when the following requirements are fulfilled:

  • Operating System: Windows 8 Pro or better
  • CPU: Must support SLAT (Second Level Address Translation)

The latter one is a bit irritating to most people, as usually you don't have to deal with such technical details. If you want to learn more about it, a starting point is the corresponding Wikipedia article [4], and in particular the additional link provided there that provides information on how to find out whether your CPU supports it or not [5]. You can also look up your CPU on Intel's [6] and AMD's [7] support lists. If your system does not meet the requirements for the emulator, you can still install the SDK, but the emulators will not run, and you cannot test your app other than on real hardware then.

With the emulators, you can now run and test code like the following (which is based on the information from the last article) without the need to actually own these devices. Even more important is the possibility to test your application's visual layout under these various circumstances.

public sealed class DeviceHelper
{
    public static PhysicalResolution PhysicalResolution
    {
        get
        {
            return (PhysicalResolution)Application.Current.Host.Content.ScaleFactor;
        }
    }
}
 
public enum PhysicalResolution
{
    WVGA = 100,
    HD720P = 150,
    WXGA = 160,
}

This code translates the "ScaleFactor" property into more type safe data on the physical display resolution.

Targeting Windows Phone 7

One thing to note is that the available emulators depend on the version of Windows Phone you target with your project. For example, it's still possible to develop for Windows Phone 7, e.g. when you create a new project:

This will add the old emulators (WVGA with 512MB and 256MB) running on Windows Phone 7 to the list of available devices:

You can now test your 7.1 app on both the previously available emulators as well as how it behaves on the new operating system version and the corresponding devices.

Emulator Features

Just like in the Windows Phone 7 SDKs, the emulators have some additional tools that allow you to:

  • Simulate accelerometer input
  • Simulate location data
  • Take and save screenshots

These options haven't really changed, expect for one minor detail: previously, when you had the display size of the emulator scaled down to something below 100%, you received a warning when you took screenshots:

Consequently, those screenshots were blurry and not usuable e.g. for the Marketplace. With the new version of the SDK and emulators, this is not a problem anymore. Even when you set the emulator to really small zoom levels, the screenshot is always taken in the native resolution and with highest quality.

By the way, one of the cool new features of Windows Phone 8 is that you can now take screenshots on the devices too. To do this, press and hold the power button and then hit the start button. A screenshot image will be saved to your image library.

The Windows Phone Profiler

No matter how hard you try, you might always reach a point where your app runs into certain problems like unexpected CPU or memory consumption. On the phone platform these problems always are a sensible topic, but they are getting even more important now, as Microsoft has announced that the memory constraints which existed but were sort of lax on Windows Phone 7 will be fully enforced on Windows Phone 8 [8]. To analyze your app's behavior with respect to these details, you can use the profiler that is provided by the SDK. The most parts of this tool haven't changed since Windows Phone 7, however a whole new option named "Monitoring" has been added:

The other two features still perform deep analysis, however the new option allows you to get a quick overview of the behavior of your app. The result will look something like this:

For those of you who know the former "Marketplace Test Kit" some of these numbers will look familiar. Things like the startup time and max memory usage have been moved here. This quick monitoring test grants access to the world of profiling for those developers who have no experience in using such a tool. Of course, once you have identified issues using this method, you might still need to refer to the more detailed options of the profiler to resolve them.

Store Test Kit

With the rebranding of the Marketplace to "Windows Phone Store" to align it its Windows 8 counterpart, the corresponding test kit for developers also has been renamed to "Store Test Kit". Here you can find (almost) all the options that we had in the previous "Marketplace Test Kit", with the exception of the monitored tests that are now part of the profiler (see above). Of course the test kit has been extended for new device features also, for example to support application screenshots for the different available display resolutions. You now have to provide at least one screenshot for each resolution your app supports, or you will receive validation failures:

The long list of manual tests still is a bit exhausting to go through, but it helps you identify typical problems with apps and potentially saves you from going through another submission process if you look at them carefully before uploading your app.

Simulation Dashboard

On of the gems in the Windows Phone 8 SDK is the new simulation dashboard that you can access through the Tools menu:

This tool allows you to simulate some of the most crucial things which are hard to reproduce for testing in a lab environment:

  • Network speeds and reliability
  • The phone's lock screen kicking in, or being removed by the user
  • An unexpected reminder that covers (obscures) your app

You can control and trigger all of these aspects from the new dashboard, on the fly as your app is running in the emulator:

This should be a tremendous help to test how your app behaves in real-world situations, for example when suddenly the network connection is dropped, or when the user receives an incoming phone call. More information on the simulation dashboard's details can be found in the MSDN documentation [9].

Conclusion

Just like other parts of the platform, the developer tools also mature more and more with this release of Windows Phone. Not only do we have emulators for all device configurations, we can also make use of the new simulation dashboard and profiler features to make our applications more robust and ready for real-world situations. With this equipment, it's about time to start coding, don't you think? ;)


Subscribe

Comments

  • MarcoBet

    Re: Windows Phone 8: Developer Tools


    posted by MarcoBet on Apr 02, 2015 07:20
    I like the valuable info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I’m quite sure I’ll learn many new stuff right here! Good luck for the next!
    • Cipto Junaedy
    • Cipto Junaedy
    • Cipto Junaedy
    • Jadwal MotoGP 2015 di Trans 7
    • Cara Upload Video ke Youtube
    • Download BBM Untuk Android Versi Terbaru
    • Cara Membuat Email
    • Cara Instal Windows 7
    • Jinpoker.com Agen Judi Poker Online dan Domino Online Indonesia Terpercaya
    • Cahayapoker.com Agen Judi Poker Dan Domino Uang Asli Online Terpercaya Indonesia
    • ituDewa.net Agen Judi Poker Domino QQ Ceme Online Indonesia
    • Nusantarapoker.com Agen Texas Poker Dan Domino Online Tanpa Robot Terpercaya

Add Comment

Login to comment:
  *      *       

From this series