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.
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 and msApplication-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-OptOut you 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
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
<h1>Example connecting your app to the store</h1>
<p>Bring up the bottom app bar and click on</p>