Starting Windows Phone Development

,Windows Phone Development Center

Windows Phone Development Center, Fair Use

The Windows Phone Development Center (WPDC) is the official web site for Microsoft Windows Phone developers. WPDC provides information on:

  1. Downloading the Developer Tools
  2. Obtain a Windows Phone Developer Account
  3. Register and Unlock Your Phone for Development
  4. Designing Windows Phone Applications
  5. Creating Your First Windows Phone Application
  6. Testing Your Windows Phone App (Windows Phone Store Test Kit)
  7. Deploying Your Apps to a Windows Phone Device
  8. Submitting Your App to the Windows Phone Store

Getting a developer account at WPDC currently costs $19. DreamSpark students can obtain a free account. The free DreamSpark account only allows you to register one device, instead of the usual limit of three devices. There have also been reports that there is no migration of free accounts to paid accounts. Some developers suggest getting a paid account before submitting apps to the store. Then you will not have to resubmit your apps when your free account expires. Once published the WP store has reports for tracking your application's progress, such as App Downloads Report, App Crash Report, and Financial Proceeds Report on a per-app basis. WPDC also has forums for the development and publishing of WP applications.

,Windows Phone Developer Account

Windows Phone Developer Account, Fair Use

Windows Phone Releases and OS Versions

In 2013 the Mobile Development Fundamentals (098-373) exam covered WP 7, so I set up my development environment for WP 7.5. You may wish to set up your environment for a more current version of WP. If you are studying for the 098-373 exam, I have created 15 pages under the Windows Phone Certification menu about the various test topics (Exam 98-373: Mobile Development Fundamentals ). I started the pages before the exam, and then updated the pages after I passed the exam in July 2013.

The Windows Phone development environments are tied to a version of Visual Studio and the Windows operating system. The Windows Phone SDK 8.0 requires both Visual Studio 2012 and the Windows 8 operating system. I used Windows Phone SDK 7.1 with Visual Studio 2010 and the Windows 7 operating system. However, I found out you could only unlock and deploy applications to a Windows Phone 8.0 device using SDK 8.0. As a work-around I set up a Windows 8 virtual machine to unlock the phone and deploy the apps, but actually developed in WP 7.5. I had no problems running the WP 7.5 apps on the WIndows 8 device.

Microsoft refers to both a Windows Phone device and a Windows Phone operating system. There is not always an apparent correlation. WP 7 and WP 8 releases directly correspond to WP operating system (OS) versions 7.0 and 8.0. However the WP 7.5 release uses OS version 7.1.

Windows Phone (WP) Release Operating System (OS) Version
Windows Phone 8 Windows Phone OS 8.0
Windows Phone 7.5 Windows Phone OS 7.1
Windows Phone 7 Windows Phone OS 7.0

Windows Phone Releases and OS Versions

When you create an app you specify target OS versions (OS 7.1/OS 8.0).

  • Apps that target OS 8.0 will not run on OS 7.1
  • Apps that target OS 7.1 will run on both OS 7.1 and OS 8.0


Windows Phone SDKs

Windows Phone SDK 8.0 is the latest (as of 6/26/2013). SDK 8.0 can target, build, and test apps for both OS 8.0 and OS 7.1. However, SDK 8.0 will not target OS 7.0. When you open an app that targets OS 7.0 in SDK 8.0, the app is automatically upgraded to target OS 7.1. SDK 7.1 can target, build, and test apps for OS 7.0 and OS 7.1.

Both SDK 8.0 and SDK 7.1 are full-featured development environments, but they have different operating system requirements, and are compatible with different versions of Visual Studio:

  • SDK 8.0 requires Windows 8 (64 bit) or above. However to get the WP 8 emulator to function requires Windows 8 Professional Edition, or above. SDK 8.0 is compatible with Visual Studio 2012.

  • SDK 7.1 requires Windows 7 or Windows Vista SP2 (32 or 64 bit). The Windows Starter editions are not supported. SDK7.1 is compatible with the final version of Visual Studio 2010 (SP1).

Note: Since my Nokia 521 is a Windows 8 phone, the only way I could find to perform the developer unlock was by running the Windows Phone Developer Registration tool in SDK 8.0. I could not get the corresponding tool in SDK 7.1 to unlock a Windows 8 phone. SDK 8.0 requires Windows 8 to run. Also to deploy my applications to the Windows 8 phone, I again had to use the SDK 8.0 version of the Application Deployment tool. My work-around for this problem involved creating a Windows 8 virtual machine to use to unlock the phone and deploy the applications. More details about creating a WIndows 8 virtual machine below.


Installing Window Phone SDK 7.1

I am running Windows 7 and have Visual Studio 2010 Professional installed. The SDK's provide a stand-alone Visual Studio Express edition for Windows Phone, or they work as an add-in to Visual Studio Professional, Premium, or Ultimate editions. The SDK's also include emulators and additional tools for profiling and testing a Windows Phone app.

I downloaded Windows Phone SDK 7.1 along with the release notes from the Microsoft Download Center. The downloaded file was named: vm_web2.exe (3,541,328 bytes). The release notes specify the hardware and software requirements for the SDK. The notes indicated that SDK 7.1. does not run on the following platforms:

  • Windows Server® is not supported.
  • Windows® 8 is not supported.
  • Windows® XP is not supported.
  • Virtual machines are not supported.

When I executed the downloaded file the install process indicated I did not have the required SP1 installed for Visual Studio 2010. After installing Visual Studio SP1, I was able to successfully complete the installation of the SDK 7.1.


,WP SDK 7.1

Installing WP SDK 7.1, Fair Use

Installing Window Phone SDK 7.1.1 Update

After reading that the SDK 7.1.1 update included IntelliSense support, I decided to run the update. I downloaded Windows Phone SDK 7.1.1 Update along with the release notes from the Microsoft Download Center. The downloaded file was named: WPSDK-7.1.1-KB2669191-x86.exe (304,737,408 bytes). When I executed the downloaded file, it indicated which programs would be affected by the update.

Note: I noticed there was also a "Windows Phone SDK Update for Windows Phone 7.8" which provided new emulator images. This updates either SDK 7.1 or SDK 8.0. If used to update SDK 7.1, it also includes the functionality delivered in the Window Phone SDK 7.1.1 update. I did not run the SDK 7.8 update. Additional information about Windows Phone 7.8 can be found on the www.windowsphone.com site.


Creating a Windows 8 Virtual Machine

I found that I could not perform a developer unlock, nor could I deploy applications, on my Windows 8 phone (WP 8) using SDK 7.x. As a work-around I created a Windows 8 virtual machine (VM) for installing SDK 8.0. I was then able to use SDK 8.0 for unlocking the WP 8 phone and for deploying SDK 7.0 applications to my WP 8 phone.

To create the Windows 8 VM, I used the free version (for non-commercial use) of VMware Player and the trial version of Windows 8 Enterprise. The trial version expires after 90-days. After the 90-days, Microsoft allows you to run the rearm command to extend the trial for another 90 days. There are many articles on the Internet describing the process of rearming the trial version of Windows 8 Enterprise.

Before creating a Windows 8 VM, verify your computer will support the Windows 8 operating system. You can do this by running the Windows 8 Upgrade Assistant. Also verify the memory and processor requirements for Windows 8. If your computer is able to run Windows 8, then download the ISO file for the Windows 8 Enterprise software and then burn it to a DVD.

Next download the VMware Player and follow the online instructions to set up the virtual machine. The entire process of downloading Windows 8 and setting up the virtual machine took a couple of hours on my computer. If you have enough RAM, you may wish to allocate 4 GB to the virtual machine instead of the 2 GB default. This will speed up processing on the VM.

Once the VM is set up, download and install SDK 8.0. Use the SDK 8.0 version of the WIndows Phone Developer Registration tool to unlock and register your Windows 8 phone with Microsoft. Also use the SDK 8.0 version of the Application Deployment tool to deploy your application to your Windows 8 phone. See the Deploying Your App to Windows Phone Article for more details about performing a developer unlock on a WP 8 phone and using SDK 8.0 to deploy your application.>/p>

,WP SDK 7.1

Windows Phone 7.5 Training Kit, Fair Use

Installing Windows Phone 7.5 Training Kit

Two free sets of training labs (Basic and Advanced) are available to help you get started coding with WP. Windows Phone Samples contains samples developed and tested by the WP SDK team. Currently there are 396 samples in C# covering a large variety of topics.

The "Windows Phone 7.5 Training Kit" contains two sets (Basic, Advanced) of hands on labs for Windows Phone 7.5 application development. I downloaded Windows Phone 7.5 Training Kit from the Microsoft Download Center. Each set was in its own download file. The basic file was MangoRTMTK_Basic2011-12-14.00.57.06.Setup.exe (226,076,520 bytes). The advanced file was MangoRTMTK_Advanced2011-12-14.01.05.09.Setup.exe (122,650,136 bytes). Executing the downloaded files extracted the labs into two directories: C:\MangoRTMTK_Basic for the basic labs and C:\MangoRTMTK_Advanced for the advanced labs. Each directory contains a file named "Default.htm" which is the starting page for each set of labs.


,Windows Phone 7.5 Basic Training

Windows Phone 7.5 Training Kit - Basic Labs, Fair Use

Windows Phone 7.5 Training Kit - Basic Labs

The above image is from the second lab in the "Windows Phone 7.5 Training Kit - Basic Labs" tutorials, which creates a simple puzzle game. All the basic labs were stored at C:\MangoRTMTK_Basic. The file named "Default.htm" is an index for the labs. Below is a summary of all the basic labs:

  • Lab 1: Hello Windows Phone - This lab introduces how to develop applications for the Windows Phone platform using Silverlight. By completing this hands-on lab, you became familiar with the tools required to create and test a Windows Phone application.

  • Lab 2: Building Your First Windows Phone 7 Application - This lab took you through the development of a Silverlight for Windows Phone application using Microsoft Visual Studio 2010 Express for Windows Phone. During the course of the lab, you created a user interface using Extensible Application Markup Language (XAML) and saw how to program the application logic and add code to respond to input events. You learned how Windows Phone applications process multi-touch input to manipulate user interface elements and how to enhance the user experience by applying animation effects. Finally, you explored the use of isolated storage to persist the state of your application.

  • Lab 3: Windows Phone Navigation and Controls - This lab introduced you to the Windows Phone layout system and the Chrome operating system/browser, including the basics of navigating between different screens (pages) in a Windows Phone Silverlight application. You built a navigation application that switches between various screens, each screen displaying different phone functionality. You added an Application Bar to the main navigation page in order to expose some functionality within the application. In the process, you learned how to use Visual Studio 2010 Express for Windows Phone in order to build and design a Windows Phone application.

  • Lab 4: Application Life Cycle - During this lab you learned about the Windows Phone execution model, application and page events triggered during this process, and how to preserve user data by using the tombstoning process.

  • Lab 5: Using Pivot and Panorama Controls - During this lab you learned about the new controls in Windows Phone 7 for presenting information, Pivot and Panorama. You also learned how to navigate between the application pages and how to handle page state information when your page gets navigated away to a different application.

  • Lab 6: Accessing Windows Phone 7 Devices - During this lab, you learned how to use the Windows Phone 7 camera chooser to capture live pictures. You learned how to access the WP7 location device to locate your real geographical position and introduced with the GPS Emulator to test your location aware applications with the WP7 emulator. You resolved street address of your captured pictures based on the exact location provided by the location device and displayed them on the Bing Map.

  • Lab 7: Game Development with XNA Framework - This lab introduced you to developing applications for the Windows Phone platform using the XNA Framework. During the course of this lab, you created an XNA Game Studio game for Windows Phone, loaded the game’s resources, took care of the input, updated the game state, added game specific logic and made sure that the game can handle lifecycle events. By completing this hands-on lab, you also became familiar with the tools required to create and test a Windows Phone XNA Game Studio game.

  • Lab 8: Discovering Windows Phone 7 Device Capabilities - Windows Phone has APIs to detect programmatically the hardware capabilities and device status. In this lab, you have used: the capability APIs in the Microsoft.Devices, sensors namespace to detect if a Gyro, compass, accelerometer, and the combined motion sensors are supported; Microsoft.Phone.Info.DeviceStatus class to detect manufacturer capabilities and physical memory available to the device; and DeviceNetworkInformation and NetworkInterface classes to detect network connectivity for the device.

  • Lab 9: Photo Fun - In this lab, you have learned how to integrate the camera directly into our application. The PhotoCamera API provides support for displaying live camera feeds as well as handling the camera button and other events. You have also seen an example of an application that connects to the camera on a lower level to apply more complex processing to the image before returning the feed to the application.

  • Lab 10: Launchers - This lab illustrated the use of launchers in Windows Phone 7. Each of the application’s many pages serves as an example for using a specific launcher. Using these examples you should be able to easily utilize launchers in your future applications.

  • Lab 11: Choosers - This lab illustrated the use of choosers in Windows Phone 7. Each of the application’s many pages serves as an example for using a specific chooser. Using these examples you should be able to easily utilize choosers in your future applications.

  • Lab 12: Weather Service Push Notifications - During this lab you learned about the notification services for the Windows® Phone 7 platform. You learned about notification types, and how to prepare and send them through Microsoft Push Notification Service. You created the business client application to prepare and send such messages and Windows® Phone 7 client application. The Windows® Phone 7 client application subscribes to the notifications and updates the UI according to the information received in the messages. You also utilized new Windows® Phone 7.1 features to manipulate application sub-tiles and send deep-toast notifications.

  • Lab 13: Using Bing Maps - During this lab you’ve learned about the Bing Silverlight Map Control for Windows Phone 7 platform. You’ve created a new account for accessing Bing Maps SOAP Services and created a private key for your Windows Phone Bing Maps application. You’ve learned about map layers, pushpins, and route calculations. You’ve created data models related to the map and bound them to different UI parts. You’ve designed styles and data templates for different parts of the map and data related to the map.


,Windows Phone 7.5 Advanced Training

Windows Phone 7.5 Training Kit - Advanced Labs, Fair Use

Windows Phone 7.5 Training Kit - Advanced Labs

The above image is from the first lab in the "Windows Phone 7.5 Training Kit - Advanced Labs" tutorials, which creates a two-dimensional (2D) game using XNA Game Studio. All the advanced labs were stored at C:\MangoRTMTK_Advanced. The file named "Default.htm" is an index for the labs. Below is a summary of all the advanced labs:

  • Lab 1: Catapult Wars Lab - This lab introduced you to developing applications for the Windows Phone 7™ platform using the XNA Framework. In the course of this lab you created an XNA Game Studio game for Windows Phone 7™, loaded the game’s resources, took care of the input, updated the game state and added game specific logic. Then we enriched the game with tombstoning and state reloading features and, after all added a possibility to share the game score with a friend via SMS. By completing this hands-on lab, you also became familiar with the tools required to create and test an XNA Game Studio project for Windows Phone. In this lab, you created a new XNA Game Studio application for Windows Phone 7 using Visual Studio 2010 and the Windows Phone Developer Tools, and then created the application logic and the layout of the user interface.

  • Lab 2: Multi-touch Game Development With XNA - This lab introduced you to developing applications for the Windows Phone 7™ platform using the XNA Framework. In the course of this lab, you created an XNA Game Studio project for Windows Phone 7, loaded the game’s resources, took care of the multi-touch input, updated the game state and added game specific logic. By completing this hands-on lab, you also became familiar with the tools required to create and test an XNA Game Studio project for Windows Phone. In this lab, you created a new XNA Game Studio application for Windows Phone 7 using Visual Studio 2010 and the Windows Phone Developer Tools and then created the application logic and the layout of the user interface.

  • Lab 3: 3D Game Development with XNA Framework - This lab introduced you to 3D game development for the Windows Phone 7™ platform using the XNA Framework. In the course of this lab you created an XNA Game Studio project for Windows Phone 7, loaded the game’s resources, took care of the input, updated the game state, and added game specific logic. By completing this hands-on lab, you also became familiar with the tools required to create and test an XNA Game Studio project for Windows Phone. In this lab, you created a new XNA Game Studio application for Windows Phone 7 using Visual Studio 2010 and the Windows Phone Developer Tools, and then created the application logic and the layout of the user interface.

  • Lab 4: Using a local database in the "Tidy" application - This lab has taken you through the necessary steps for working with a local database in a Windows Phone application. After the initial setup, which mainly includes the definition of the data context, LINQ to SQL makes you nearly oblivious to the existence of the database. This new capability should allow you to create applications that handle a large amount of data with great ease.

  • Lab 5: Background Transfer Service in the "Tidy" application - This lab has shown you how to use the new Windows® Phone Mango APIs to add background files downloads and uploads to your application. You have also seen how background files transfer can be used to create backup/restore functionality needed in your application.

  • Lab 6: Fast Application Switching in the "Tidy" application - This lab demonstrated how easy it is to detect FAS and how seamlessly it enhances the experience of restoring your application. We have also seen how to force an application to tombstone for debugging purposes. You should now be able to embrace this new feature and recognize the ways in which it can affect your application.

  • Lab 7: Creating Notifications in the "Tidy" application - This lab has shown you how to use the new Windows Phone Codenamed Mango APIs to add reminders and alarms from your code. It has also shown you how reminders can lead to a specific page in your application when the user interacts with them, and how to set a specific sound for use by an alarm.

  • Lab 8: Adding Multitasking to Your Application - This lab has taken you through the necessary steps for creating a background agent to update the application’s tiles. Using this as an example, you should now have a greater understanding of Windows Phone Mango’s new multitasking capabilities and should know how to incorporate these capabilities into your future applications.

  • Lab 9: XNA 3D Model Viewer - In this exercise, you have learned how to use two features introduced in Windows Phone Codenamed Mango. You have explored the BackgroundTransferService, which exposes a centralized download manager that can integrate with your application while running independently of your application. You have also seen how to embed and manipulate XNA content on a Silverlight page, creating a hybrid Silverlight/XNA application that can showcase the best features of what were once two separate worlds.

  • Lab 10: Search Integration - This lab has shown the various steps that are required to integrate an application into the phone’s built-in search capabilities. Using this technique, you can provide your very own added value to common search results.

  • Lab 11: Background Audio Agents - This lab has shown you how to use the new Windows® Phone Mango APIs to play music. You have also seen how to use this new API to develop an application that can play audio even while not in the foreground.

Summary

The Windows Phone Development Center is the official web site for Microsoft Windows Phone developers. It contains the information you need to get started with development. Be aware that the Windows Phone development environments are tied to a version of Visual Studio and the Windows operating system. You also need to consider the version of WP installed on your hardware device. Once your development environment is set up, you can use the basic and advanced sets of training labs to help you get started coding with WP.