SDK Tools Guides

Home

Developing Windows Phone Applications

Windows Phone is a mobile platform from Microsoft that is becoming increasingly popular. Window Phone is a successor to, but is not compatible with, Microsoft's Windows Mobile platform. The Windows Phone uses the design language Metro for its user interface. Here we take a look at some of the key features of this platform.

MoSync support for Windows Phone

From release 3.0 of the MoSync Mobile SDK, we have extensive support for version 7 of this Microsoft platform. For a list of Windows Phone capabilities supported by the MoSync Mobile SDK, see Feature/Platform Support.

Requirements

To be able to create application packages for the Windows Phone platform with the MoSync SDK you need to install the Microsoft Windows Phone SDK (which includes Visual Studio). The Windows Phone SDK runs only on Windows Vista SP2 and later, needs 3 GB of RAM and 4 GB of free disk space. At Microsoft's Download Center you can find more detailed requirements.

The MoSync SDK outputs an application in XAP format, which you then publish through the Windows Phone SDK.

Marketing your app

The Windows Phone Marketplace is the main distribution point for approved Windows Phone apps. Users download your app from the Marketplace using Zune or similar software.

Microsoft requires that you submit your apps for approval before they allow them to be published on the Marketplace. You will need to register as a Windows Phone developers before you can submit your app for approval. There is a yearly fee.

To submit your app you use App Hub web application. It provides development tools and support.

Pricing of your app is up to you, but Microsoft takes 30% of the revenue and only pay when sales have surpassed a certain figure. If you are not a US developer a withholding tax will also be deducted. Furthermore, Microsoft only pays developers from a limited list of countries.

Emulation

You don't need a Microsoft account to run and test your apps in the Windows Phone Emulator. You will, however, need a machine running the Windows Vista of later operating system to run the Windows Phone emulator. For information about the Windows Phone Emulator, system requirements, and how to install it, read the instructions on the MSDN Windows Phone Development page.

Once the Windows Phone emulator is installed, the MoSync SDK should find it automatically. Just select Windows Phone/7 as your active profile, then run your project. Select the Windows Phone emulator from the dialog box. (Alternatively, you can configure the emulator path from the IDE: select Window > Preferences > MoSync Tool > Visual Studio (WP7) > Visual Studio Location.

Building Windows Phone applications

To build and run Windows Phone applications from the MoSync IDE, you need Visual Studio 2010 or Visual Studio 2010 Express editions.

  1. Select a Windows Phone profile from the Platform and Device Profiles window in the MoSync IDE. (For pre-MoSync 3.0 projects, if you cannot see the platform-based profiles, check the "Use platform based profiles" box in project Properties > MoSync Project).
  2. Build your application. If you are on a Windows machine, jump to step 5.
  3. On a OS X machine, the build process generates a Visual Studio project in the Output folder. Import this project into Visual Studio from where you can build the Windows Phone application package and run it in the Windows Phone emulator.
  4. An application package (.xap) will be created for you under under the ReleasePackages/Windows Phone folder. Next, you need access to a Windows machine with Visual Studio installed. Import your project in Visual Studio, build and run it.
  5. To run the application in the Windows Phone emulator, in project Properties > Run As, browse... to your application and from the drop down list select Windows Phone Emulator and run it. Another option is to import the generated Windows Phone project (under Output/ folder) in Visual Studio 2010 from where you can build and run your application.

Sending applications to devices

You need to have the Zune software installed in order to be able to deploy your application on the Windows Phone device.

  1. Once you have Zune installed, connect your device to the Windows OS machine and open the project generated by MoSyn IDE, called mosync.csproj, in Visual Studio. For the 3.0 release, you can find your generated project under <path_to_your_app>/Output/Debug/Windows Phone/7/package or <path_to_your_app>/Output/Release/Windows Phone/7/package/project/, depending on the build configuration you have choosen, e.g. Debug or Release.
  2. After you have the project loaded in your Visual Studio IDE, set your target on "Windows Phone Device", set the "Solution configuration" on "Debug" or "Release" and hit the run button.

 

MoSync SDK 3.3
Copyright © 2013 MoSync AB
www.mosync.com