Building Connected Windows 8 Apps with Windows Azure

Hey – I thought I would share this video, deck and completed demo for all of you who attended my TechEd North America + Europe sessions

Are you building a connected Windows Metro style app? This session introduces you to Windows Azure and demonstrates how you can build connected experiences for your Windows 8 Metro style apps. After walking the through the fundamentals of both platforms, we take a deep dive as we demonstrate how you can use Windows Azure to support common geo-location, multimedia, data and push notification scenarios. At the end of this session, you will be empowered to begin building and deploying your own Windows 8 client applications that are powered by Windows Azure

You can download the full video in high res from channel 9 here

Download the deck Here
Download the source Here Note I have removed the connection strings for SQL + Windows Azure storage + Bing Maps. You will find all places that you need to replace these by doing a search for TODO-REPLACE. Enjoy!

Kind Regards,
Nick

Join the Learn Windows Azure Track at TechEd North America

Come and Join us at TechEd North America in the Learn Windows Azure Track this Monday in the room N310 to learn about the latest from Windows Azure Engineering Leadership. For those of you who are attending in person click the links below to add to your TechEd Agenda. For those of you who are not attending TechEd we will be streaming it Live – register here

Note times below are shown in Eastern Time (for those on PDT we kick off 8am)

11:00 – 12:00 pm – Windows Azure Today & Tomorrow (Scott Guthrie)Windows Azure is a flexible and open cloud platform for a wide variety of applications ranging from web sites to enterprise and mobile applications.  In this foundation session Scott Guthrie will demonstrate how to quickly build and deploy applications using the new Windows Azure features and services including Windows Azure Web Sites, Virtual Machines, and new developer tools and SDKs.

1:15 – 2:30 pm – Windows Azure Applications and Workloads (Mark Russinovich) Join Technical Fellow Mark Russinovich as he demonstrates new functionality in Windows Azure that allows for easy application migration, simple provisioning of new compute resources and advanced enterprise data center scenarios. Learn how you can use this new functionality to on-ramp applications as-is to the cloud or extend your data center to create true hybrid solutions.

3:00 – 4:15 pm – Web Sites on Windows Azure (Bill Staples) Join Windows Azure General Manager Bill Staples as he introduces the newest features and services for building web applications on Windows Azure. Learn how Windows Azure makes it easy for you to easily build and rapidly deploy everything from content management systems to high-scale ASP.NET web applications.

4:45 – 6:00 pm – Cloud-Ready Data Services (Quentin Clark) Windows Azure includes a complete set of enterprise-ready data services, including Windows Azure Storage and SQL Databases. In this demo-filled session developers will see how to can effectively use these services to develop and migrate data-centric applications to Windows Azure, while using familiar tools.

I look forward to seeing you there!

Nick

Sending Language specific Push Notifications to Windows 8 using the WnsRecipe

I was recently asked to help out with a MSDN forum post on how the WnsRecipe NuGet package can be used to send Push Notifications via WNS to Windows 8 Metro app clients.  Essentially here are the steps.

Note: This post assumes you have already created a client app, requested test credentials for WNS and received a notification channel in your cloud service.  If you have not yet done this I would recommend you watch this episode of cloud cover where I demonstrate the setup:

If you want to download the hi def version here is the direct link to Channel 9 for this episode .

Now that you have watched the pre-req the rest is really quite simple.

Install the WnsRecipe NuGet into your solution using the NuGet Package Manager

  • Right click on your project and select ‘Manage NuGet Packages’
  • Select Online and search for WnsRecipe and press Install
    using NotificationsExtensions; 
    using NotificationsExtensions.TileContent;
    
  • Use the recipe as per normal but recall to set the appropriate BCP 47 language code  for your wideTile.Lang and squareTile.Lang properties
    //new up an access token provider with your credentials
    IAccessTokenProvider tokenProvider = new WnsAccessTokenProvider("<your package sid>", "<your client secret>");     
    var uri = new Uri("<your endpoint uri>");
    
    //Create the wide tile
    ITileWideText09 wideTile = TileContentFactory.CreateTileWideText09();     
    wideTile.Lang = "de-DE";     
    wideTile.TextHeading.Text = "Test-Paket";     
    wideTile.TextBodyWrap.Text = "ä";
    
    // new up a square tile to send down with the wide tile
    // as you do not know if the user has pinned the tile to small or wide
    ITileSquareText02 squareTile = TileContentFactory.CreateTileSquareText02();     
    squareTile.Lang = "de-DE";     
    squareTile.TextHeading.Text = "Test-Paket";     
    squareTile.TextBodyWrap.Text = "ä";     
    
    // set the square tile content
    wideTile.SquareContent = squareTile;
    
    //Send notification - note you should pay attention to the Status codes coming back from the 
    //send operation in the result variable.
    var result = wideTile.Send(uri, tokenProvider);
    
  • And that’s basically it as mentioned above this is a somewhat fragment sample. Please do watch the Cloud Cover episode if you require more detail

For a full list with screenshots of the different tile template types please see this MSDN reference