Archives For Windows Phone

This is a blog post that has been sitting on my laptop, all written and ready for posting, for just about two months now. I worked on the post when Jeff posted his social extension for 4th and Mayor…but shelved it when the topic died down. When talking with my colleague, Larry Lieberman, about the topic, he convinced me to dust it off and post it…and also convinced me to make an appearance on Inside Windows Phone. I hope it better explains what the team shipped with 8.1.  – CRS

With the new Windows Phone 8.1 release, a whole new class of social extensibility points are now available for developers. These new extensions begin to open up a new area of the phone to developers that were pretty closely held – the People and Photo hubs. While these new APIs add a number of highly requested social capabilities to the platform, the new extensions also seem to be a source of confusion.

As the team released the Windows Phone 8.1 preview and devs started digging into the new APIs, I started getting a number of questions on the topic (on social, in my inbox, and on the phone), and I started digging into the topic with the teams that built the features (admittedly, the topic was new to me and missing from all of my ‘what’s new in phone’ discussions so far). In my honest opinion, I found the new social capabilities in 8.1 pretty amazing.

As I haven’t seen much on the topic, I thought it was worth writing up a semi-quick blog post on the topic to explain what I found and to provide some pointers to related reference material. There’s just so much more richness to the subject than 140 characters can do it justice. Smile By the end of the post, my hope is that the new extensions points are much clearer: not only what they are (and what they aren’t), but how you can get started taking advantage of them today.

Why social?

Windows Phone has always been, at the heart, a social phone. This value proposition was the one that resonated most to me, and is central to my ‘why I love my phone’ pitch. Using the People Hub and pinned groups, my phone connects me to the people that matter most in my life (via a couple live tiles), as well as to my broader social graph. At a glance, I can get everything that matters to me in one place, regardless of its source (Facebook, Twitter, LinkedIn, email, or SMS).

wp_ss_20140701_0001The People Hub is magic. As a father of three and Seattle transplant (with all of my family back east), it makes it easy for me to share the day-to-day with my personal networks. Last month, that update was to share news of our girls taking their first steps. And I believe it goes without saying that I’m busy – and the People Hub enables me to get the low-down on my social graph without having to actually go a number of dedicated apps. Again – magic.

There were a couple limitations with this approach, however. While folks generally love the integrated experience, but wanted additional/deeper network-specific features in the native People Hub experience (e.g., to like a photo). And for our international customers, the deeply OS-integrated approach meant that the Windows Phone engineering team was then the only group that extend the integration to additional key social networks around the world.

What can be extended?

To open up the Windows Phone social hubs (the People Hub and the Photos Hub), the team built out a social extension framework to enable Windows Phone to light up anyone’s social graph. imageOver time, this approach should not only make it easy for social networks to extend the hubs, but also to bring flexibility that enables social networks to light up specialized integrations to our users.

With 8.1, there are three integration points that are opened up for app developers publishing into the Store:

  • Social broadcasting: Apps can extend the ‘Me’ card to enable the user to choice and launch an app to checks in or post a social update. As I understand it, the documentation on these is still in the works, but Jeff Wilcox publicly shared out the source code for his Social Extension for 4th & Mayor app.
  • Contact cards: Apps can still integrate with the contact cards to add and extend contacts in the phone’s address book. What is new in 8.1 is the ability to bind to the contact card using a ‘contact binding’ to place an app tile into the new ‘Connect’ pivot to contextually extend the contact. By implementing a contact binding, you provide the phone user with a way to display relevant information about that user (e.g., service username, user/gamer/karma score, relevant pictures, latest update) and provide a way to deep link into your app to immediately interact with that user.
  • Photo Hub: For services that host user photos online, you can also now integrate your app into the Photos Hub, surfacing your app as a tile on the album pivot, enabling your users to jump right into their pictures on your service. This means being able to launch off from one place, the Photos Hub, into each and every connected photo sharing service, without having to navigate in and out of each and every app, looking for that one family picture that you want to show someone.

wp_ss_20140701_0002With the new social extensions, there’s a lot that you, as an app developer, can do to enrich the social lives of your users by surfacing relevant service information in-context. And the result is win-win: for you, you get discovered and launched more often; for your user, the functionality and experience they want is always at their fingertips. Smile


And that’s not all…

Beyond these sweet new social extensions that you can use in your app, it’s worth calling out that you also have the Action Center, contextual awareness via Cortana, and all the yummy goodness of WNS and the new tile templates…with each of these topics totally worthy of a blog post unto itself.

As a developer, it’s really hard not to get excited about all of the new tools that Windows Phone 8.1 adds to an app developer’s toolkit. And as a social network user, it’s even harder to not get excited about all the innovative social experiences that developers can build using them…right there in that magical place called the People Hub.

wp_ss_20140418_0001One of the common questions I’ve been getting over the past week from folks has been how to take advantage of this semi-obscure ‘Project my Screen’ entry that was added to the settings collection with Windows Phone 8.1.

This entry is enabled in one of two ways: by using Miracast capabilities delivered in 8.1, and by using the Project my Screen app on a PC and connecting your phone to your PC using a USB cable (sorry – no WiFi yet).

I believe the ‘Project my Screen’ application has been one of the more eagerly awaited features by developers and technical enthusiasts alike. Since we launched Windows Phone 7.0, I’ve received at least a 2-3 mails/questions a month on how they can do demos like Microsoft presenters. With this enabled, anyone can fire up their phone and project a demo of their app or their phone. So, let me lay out how you can demo your app and phone. Smile

Project my Screen requirements
The application is a desktop/x86 application (not a Windows Store app), and should run on Windows 7 and later. And, talking to the team, there is currently no plan to expand this to a Store app, nor is there a plan to enable this to connect to a television or non-PCs. A lot of this stems from the core purpose of this viewing application is to enable demos. The use case for televisions and other device types will come along with Miracast support (I don’t have any details on this, but I will post more on this as I get more information).

How to install it
To make use of the Project my Screen app, you need to do the following:

  1. Download and install the Project My Screen app from the Microsoft Download Center
  2. Start up the application using the ‘Project my Screen’ shortcut on the desktop or program list. This will start up a full-screen – click <ESC> to get that puppy to window down
  3. Connect your phone to your computer using a data-transfer quality USB cable
  4. You should get a prompt for permission to allow screen projection, click ‘yes’
  5. At this point, your phone screen should show up (similar to below)

4-18-2014 2-09-47 PM


Command cheat sheet

There is a limited number of commands available in the application to control the demo experience. The table below summarizes the commands available to you (you can get this list in app by hitting F1):

Action/Command Key
View the help screen <F1>
Quit to windowed mode <ESC>
Toggle background image on/off B
Toggle the expanded screen mode E
Toggle full-screen mode F or <Alt>+<Enter>
Toggle the phone shell image P
Toggle visibility of ‘touch dots’ T
Display the current [desktop] frame rate R
Force orientation to landscape left Left arrow key
Force orientation to landscape right Right arrow key
Force orientation to portrait up Up arrow key
Force orientation to portrait down Down arrow key
Reset orientation to match phone <spacebar>

…if your screen won’t project…

4-18-2014 2-27-16 PM

If you don’t get a prompt on your phone and the Project my Screen app remains blank/black, you may have some old phone drivers hanging around. To get rid of them, head over to your machine’s device manager (my preferred way of getting there on Windows 8.1 is to secondary-mouse-click on the Start button and select ‘Device Manager’ from the pop-up menu).

Once in the Windows Device Manager, you’ll want to remove + uninstall the drivers related to your device. When removing these drivers, it’s important that you get them all – not only the actual device itself, but the related USB device drivers.

To do this, do the following steps, keeping the plugged in:

  1. Right-click on each driver you want to delete and select ‘uninstall’
  2. A dialog will pop up asking you to confirm uninstallation. If you also have the option to delete/remove the drivers, select that
  3. Once they’ve all been uninstalled, unplug and replug in your phone back in and Windows should take care of the driver magic
  4. You should also now get the screen projection prompt shown above

4-18-2014 2-29-46 PM


Happy projecting!

VS Issue: Designer failing

October 27, 2013

Update: I believe I solved this issue, and this post has been refined to point to the actual issue (and not the way I treated the symptoms of the bad cache).


I was running into an issue while developing in my Windows Phone app in Visual Studio. After banging my head against the wall for several hours looking for a ‘real problem’, it turned out to be an issue in my view model.

My Issue

For any XAML pages in my project where I used the Telerik controls in my project, I received a design-time error whenever Visual Studio attempted to render the page. Funny enough, the error was different depending on which instance of Visual Studio I opened/ran the project in:

  • Visual Studio 2013: ObjectDisposedException: Cannot access a disposed object (NativeObject)
  • Visual Studio 2012: Error HRESULT E_FAIL has been returned from a call to a COM component

NativeObj Exc

This error drove me nuts for a variety of reasons:

  • The same XAML worked in other projects (e.g., Telerik sample code)
  • Creating a blank/new XAML page worked until I added any of the Telerik controls
  • Reinstalling/readding the Telerik controls didn’t do anything.
  • The stacktrace was absolutely meaningless

Funny enough, the error keeps coming back – and I’m guessing it seems to be related to having the Telerik controls open in two projects at the same time in VS2013. It looks like VS2013 changed the way it handles errors in the XAML files – I say this because the sample data XML file that I was using in VS2012 had no issues, but it reported issues in VS2013.

My Initial Solution – Cleaning the Cache

After playing with a large number of things, I tried doing an aggressive cleaning of everything related to the project:

  1. I did a ‘clean’ for every project in the solution
  2. I removed every \bin and \obj folder in the solution
  3. I cleared out the Visual Studio designer temp files
  4. I cleaned up Windows temporary files

After doing the four things above, I returned back to my project, did one more Clean (just because you always double-tap Smile) and then did a Build on my WP project. I then reopened the XAML file, and everything worked once more! Yay! However, opening it up in VS2013 caused everything to get hosed again. So, I did more digging and eventually found my issue was in how I interacted with Isolated Storage in my view model.

My Solution – Fixing my ViewModel


At the heart of the issue, I was using isolated storage settings in my view model (for storing username and a userhash), which I was then taking advantage of in my sample data xml file. And that sample data XML file was being used to render design time data in XAML via data binding. VS2013 seems to look for and throw an error in the sample data XML that VS2012 wasn’t throwing, and this is what was causing an issue above.

I added the below check around the assignment/reading of the IsolatedStorageSettings object to verify that it should go over to the isolated storage area before actually doing so:

if (!System.ComponentModel.DesignerProperties.IsInDesignTool) {
  settings.TryGetValue<string>("username", out m_username);

Using the above check prior to doing a TryGetValue, everything now works appropriately, treating not just the symptoms, but the root cause.

Hope this helps!

Last week, I had the pleasure of visiting AppCampus in Helsinki. While there, I spent time with each of the teams in residence reviewing their apps and their app strategy, and I even did a short talk to the group that starts from the subject of app decay and what developers should consider to avoid decay and be successful. It was a great having the opportunity to engage with so many new app devs and to see the fresh ideas that folks are bringing to life for the mobile app market; but I also noted a continuing trend where app devs focus on birthing their apps while neglecting their upbringing. Smile

Since I joined the team, the topic of ‘success’ for the average/breadth mobile developer has been a top of mind item for me. And while there are a number of factors that contribute to the success of one’s app, perhaps the success factor that is most overlooked by developers is focusing on a meaningful user engagement.

As I talk to app developers about their apps, most talk about building a functional app that accomplishes some purpose and potentially then talk about the user experience and adding polish that presents their functionality in some compelling fashion. Some will then talk about app discovery and download numbers. But very tend to think about their go to market strategy for their app, let alone talk about.

And so that is the topic I engaged the AppCampus teams on:

  • The need to understand the user
    (who are they? what do they care about? why are they in your app, anyway?)
  • The need to understand how your user wants to be engaged
    (what will bring them back? what will they find valuable?)
  • The need for you and your users to discover one another
    (what’s your launch strategy? where are your advocates? how will you grow?)

Developers continue to be caught in the age-old trap of believing that they are their customer and that they should develop their app for their tastes and scope the features and user experience to their preferences. And so they build an app to their own needs (and perhaps ask their wife to give them usability feedback), they release it to the store, and then wonder why they get only about 200 or so downloads.

If you really want to succeed, you need to think ahead and have a go to market strategy. To do otherwise, in the words of a dev I met a couple months ago, ‘is like buying an electric guitar and expecting to have a hit single.’

I’ll drill into these topics more in a series blog posts on factors that contribute to an app developer’s success. But, in the meantime, feel free to enjoy my slides on the topic; I admit that they may be a bit limited in their usefulness without the talk track, but I’ll flesh that out in the coming weeks as your interest and my time allows.

A couple weeks ago, as part of a fairly sizable ‘August update’ blog post, the Windows Phone team announced that they expanded developer unlocks to enable hobbyist developers to unlock their personal device to test their code on a real device.

After a number of questions on the topic via email and Twitter, I thought it was worth posting a blog entry detailing the device unlock expansion to help folks understand what happened (and what didn’t happen). Given the number of things announced in one blog post, it seems a number of people connected things together that weren’t intended to be.

Quick context: developer unlocked phones

With the launch of Windows Phone 7 (and the accompanying Marketplace), developing for Windows Phone has required this thing called a ‘Developer Unlock’ to deploy an app to a phone. Once unlocked, a developer with a current/paid membership on the Windows Phone App Hub/Dev Center could use their Microsoft Account ID to unlock 3 of phones, and side-load up to 10 applications. The intent here is to enable apps to be tested and run on the device prior to submitting them up to the Store.

It’s important to note that a developer unlocked phone is different than what some folks call a carrier unlocked or network unlocked phone. A developer unlocked phone can side-load apps, but it’s still bound by all other MO and OEM restrictions that are placed upon it.

So what changed this month?

Starting this month, anyone can developer unlock their phone. This means two things for a developer:

  1. They don’t need to pay for a Windows Phone Dev Center account in order to debug and run a personal app on their personal phone
  2. While SLAT is still required for to run the WP emulator, devs can now debug their app using their personal Windows Phone. While you’ll still need an x64 processor and Windows 8 (any edition) to run the WPSDK, folks just starting out with WP should no longer be blocked by the HyperV-based emulator (which requires Windows 8 Pro (or above) and a SLAT-capable processor) if they have a device to run the app on.

And those two things are pretty awesome!

But there is fine print, and here it are the limits with this when using a Microsoft Account that is not paid/registered on the Windows Phone Dev Center:

  • Number of devices: Up to 1 phone can be dev unlocked
  • Number of apps: Up to 2 apps can be side-loaded

While the above could be thought of as limiting, I believe the expansion was made for the hobbyist developer, providing enough capability to get these folks started with experimenting with app development on the Windows Phone development platform. Should they need the ability to side-load + use more than 2 apps at once, then they are likely ready to graduate past the hobbyist status and get a Dev Center account.

What’s the experience for the hobbyist?

The overall experience of developer unlocking a phone doesn’t change for the developer beyond two aspects:

  • The hobbyist is subject to the limits above
  • Registering a second device happens silently

So what does that second point mean? When a paid/registered developer uses the Windows Phone Developer Registration Tool to dev unlock a phone after they’ve reached their limit, the tool provides an error message telling them that they’ve exceeded their limit. For the hobbyist developer, no such message is displayed. Instead, the system will automatically replace their old phone with the new one the developer is unlocking, and the prior phone will automatically and silently relock.

I call this behavior out because it caught me by surprise the first time I saw it, having been used to the prior error message. However, in a one-device system, this behavior actually makes a ton of sense, because it means that the hobbyist developer doesn’t need to track down the prior phone and do a unregister/relock prior to being able to use a unlock a new device (e.g., she sold the phone or has simply moved on from the cool 920 to the awe-inspiring 1020 Smile).

So that’s the low-down on that ‘developer unlock for everyone’ capability. This capability has been a long-time coming, and I’m very happy to see the Windows Phone folks finally get that one out to the hobbyist community.

Today is an exciting day at Build – the Windows 8.1 Preview is available for download! If you’re like me, you can’t wait to update your machine to take advantage of everything delivered in the new release.

Among the enhancements and changes in Windows 8.1, it looks like the team made some changes that affect Hyper-V, creating a compatibility issue with the Windows Phone emulator (XDE) included in the Windows Phone SDK 8.0. Thankfully, this is quickly fixed with Visual Studio 2012 Update 3.

When you start up the Windows Phone 8.0 emulator on your newly updated machine, you’ll likely be greeted with the following dialog box from the Windows Program Compatibility Assistant, informing you that the emulator has compatibility issues:


To resolve the issue, you need to install the Visual Studio 2012 Update 3 (hereafter simply referred to as VSU3 for the sake of brevity). Among all the goodness in the update that RTM’d today, VSU3 includes an update that enables the XDE to install and work on Windows 8.1. And, in case you’re curious, you should be able to install VSU3 either before you install the Windows 8.1 Preview or after…as long as you install it before you use the emulator again, you’re all good.

To install VSU3, you can either download it from the Microsoft Download Center page, or you install it from within the Visual Studio 2012 environment. To install VSU3 from within VS2012, follow the following steps:

  1. From within Visual Studio 2012, select the ‘Extensions and Updates…’ option from the ‘Tools’ menu
  2. Within ‘Extensions and Updates’, you want to navigate into the ‘Updates’ section and select ‘Product Updates’, which should provide you with the option to update Visual Studio to VSU3
  3. Click ‘Update’ and let the update roll

6-23-2013 10-47-26 AMRegardless of the update path you take, you can kick off the upgrade and grab a coffee (or, in my case, a Slurpee) and let it run for awhile. After it completes, we’re once again on the happy path and the emulator launches just fine!

I hope this blog post helps you out,

[Edit Jul-1-2013: I modified this post to remove some dialogs that I encountered when I was installing VSU3 RC2 and also to add in how to install the update from within Visual Studio; thanks to those who provided these suggestions!]