Let’s talk about URI Schemes. Marco Siccardi wrote a great post about this topic the other day: Why Windows Phone apps deserve a custom uri scheme (and how to add a simple launch uri). If you haven’t already please go read it, I’ll wait.
So I definitely agree with Marco that more apps should be implementing (and documenting!) URI schemes in their apps. But I wanted to bring up a new topic, creating new community URI schemes and implementing “Callback URIs” for App-to-App communication.
Community URI Schemes
When Microsoft brought URI Schemes to Windows Phone 8 it introduced a few URI schemes that certain apps could register for. The ms-drive-to: scheme for navigation apps is the best example of this. Any navigation app, CoPilot GPS for example, can register for this URI scheme. When the URI is launched from another app, or from clicking ‘drive’ on a Bing local search result then CoPilot GPS will be launched and start navigating you to the specified destination. If you don’t have CoPilot GPS or another Navigation app, then the phone will prompt you to go to the store where it will search for apps that will respond to the ms-drive-to URI scheme.
It all works really well, and I think we need to extend this concept to other apps. Podcast apps are a great example; the built-in podcast support of Windows Phone is lacking, especially outside of the US. So a good podcast app is a must have on Windows Phone. A lot of users of my app Car Starter requested podcast support, but I had no desire to build podcast functionality into my app. So I started reaching out to the developers of popular podcast apps to see if they’d be willing to add a URI scheme to their app. P | Cast was the first to add this, and the URI scheme he provided is great. But I’m also hoping to add support to other Podcast apps, each of which will implement it’s own custom URI scheme with different launch parameters.
What if instead the community outlined a new standard URI scheme for Podcast apps? Something like wp-podcast-play:. There would be a few benefits to these community URIs. First apps like Car Starter and NFC Toolkit would have an easier time consuming URIs. Second, if you’re an app that registers for one of these URI’s you should get some additional exposure! If someone doesn’t have any podcast apps on their phone but has another app that launches the wp-podcast-play: URI then they will be taken to the windows phone marketplace to select between the available podcast apps that support the URI scheme!
Another concept I’d like to propose is the idea of Callback URIs. I recently spoke to the developer of Live Music Access who recently added a URI scheme to his app so that Car Starter could launch it. His app works great, and I’m glad my users can now easily get into his app to listen to some live music, but the user experience to get from LMA back to Car Starter could be better. Right now the only way to do it is to long-press the back button, swipe and tap on Car Starter. But what if Live Music Access knew that Car Starter was the calling app and that it should return to Car Starter after performing some quick operation like pausing the current song. This could be done with URIs!
Here is my proposed example:
Windows.System.Launcher.LaunchUriAsync(new Uri("wp-podcast-play:?action=Pause&return-uri=car-starter:&return-app=Car Starter"));
When a Podcast app sees this URI it obviously knows that the user wants to pause the currently playing Podcast. With the additional arguments of return-uri and return-app the Podcast app can also perform it’s own LaunchUriAsync():
Which will bring the user back to Car Starter after pausing the podcast! Much better UX then the user having to long-press the back button!
So, that’s the end of my URI proposals. I’m not really sure what the next steps would be, but I know it’d definitely help if DVLUP were to create a challenge encouraging app developers to implement a URI scheme. So please up vote this feedback request on DVLUP.
If you have your own ideas on URIs or suggestions on how to get the ball rolling on this concept, please leave me a comment.
Today I was pleased to discover that the idea of Community URI Schemes has already gone in to practice in atleast 1 niche of apps. Scott Lovegrove saw my blog post today and told me about the URI scheme he defined for Pocket apps on Windows Phone. See more information here.