Connecting your website to your Windows Store App with meta tags
A pretty cool thing you can do to better connect your website with your Windows Store App
Oddly enough most developers I’ve talked to are unaware of this little cool thing you can do to connect your Windows Store App with your website so I’ve decided to write up this little blog post, and also show a working example.
Connecting your Windows Store App and website
How to connect your website to your Windows Store App by using the new meta tags
How to connect your website to your Windows Store App by using the new meta tags
You can display a Get app for this site menu alternative to the user when they navigate to the website, or Switch to MyApp app if it’s already installed with the msApplication-ID andmsApplication-PackageFamilyName tags. You can also pass information to the app with the msApplication-Arguments tag, by default the URL of the current site will be passed. The app receives the arguments on the OnLaunched event (in C#) and onmainwindowactivated event (JS).
You can also redirect the user to update their app to latest version if they have an old one installed by using the msApplication-MinVersion tag. With the msApplication-OptOutyou can disable either install or switch (or both but you still want to redirect to store).
Here are the rules:
Metatags have to be in the head section of the page
msApplication-ID and msApplication-PackageFamilyName are required ,- the rest optional
Currently this only works in the Modern UI Internet Explorer
Package family name can only be retrieved once the app package is created for publishing to the Windows Store
How to:
Add the two tags in the head section
msApplication-ID is found under Package name in your app manifest
msApplication-PackageFamilyName is found under Pachage family name in your app manifest
Where to find msApplication-ID and msApplication-PackageFamilyName in your Windows Store App
Code
[sourcecode language=“html”]
Comments
Last modified on 2013-01-18