There’s a chicken and egg problem out there, and I think I can help.
It’s nice in a Windows Phone app to be able to share links to things – after all, that’s what the ShareLinkTask is for in the API.
It’s even better if you can let users share a link to your app from within your app. It removes the burden from them, and lets them get all social when they first experience that giddy moment of glee they get from using your absolutely awesome creation.
However, there’s a problem here. To share a link to your app (and have it instantly installable!) they’re going to need a link to the marketplace for your app. Unfortunately that link only gets assigned once your app is published.
So how the heck do you do that?
I got some feedback from Jarek Kowalski on the Windows Phone Certification team about this (thanks Jarek!). Apparently you can upload your XAP file to the marketplace, but not submit it, and this will give you the direct link you’re seeking. It just won’t go live until you publish, but the app-ID will be fixed from that point on, and you can just slip it into your URL.
There are some benefits to have a fixed location on the web that you can point at though, so I’m going to keep the rest of the article up as-is.
Well, you could publish it twice, but that’s slow and messy. Here’s another solution.
MS Tags To The Rescue!
A Microsoft Tag is a cute little thing kind of like a QR tag, but more colorful. In fact, they can look like this:
Now, I’m not going to suggest you go to that degree of effort… but it’s cool that you can. (And what’s cooler is that Bing Search on Windows Phone Mango has that cute little “visual search” button that you can hit, and it’ll recognize these tags automatically).
And we’ll probably need one of these things anyway, so you can advertise your app on bulletin boards at your workplace and start driving grass roots support.
So head on over here, and create one: http://tag.microsoft.com/my-tags/getting-started.aspx
What This Buys You
Ok, so a tag is cool, but what does it buy you in this scenario?
It gives you a fixed endpoint for a Uri, which you can dynamically change later.
This is actually quite a big and useful deal, and it’s just a side-effect of how the Tag service works, but we can use it to our advantage.
So you can use the link that the tag represents as the link your app shares out. And later on, once it’s published, you just replace the link with something else.
What’s even cooler is that it’ll let you redirect users of other mobile OSes to different locations if you want to (or if you have a version of your app for that other OS).
Killing several birds with one stone. Gotta love it. Here’s the final result:
And… if you really want to, you can create a QR code as well from the same place. All the more reason to use the tag service!
But this isn’t the part you want for your app. For your app, Download the resulting tag, and download it as a URL (it’s one of the download formats). Take that URL, and put that in your app. For example, the one I generated is: http://tagr.com/t/V3lDMz
Hey presto. Redirect that puppy anywhere you want by editing your tag later. For now, my tags and that URL redirect you to a page saying “Your mobile device does not support this content”. It’ll go live some time in the next couple of weeks… until then, enjoy!
Simon Cooke is an occasional video game developer, ex-freelance journalist, screenwriter, film-maker, musician, and software engineer in Seattle, WA.
The views posted on this blog are his and his alone, and have no relation to anything he's working on, his employer, or anything else and are not an official statement of any kind by them (and barely even one by him most of the time).