Jan 182013
 
 January 18, 2013  Posted by at 11:05 pm WinRT Tagged with: , , , ,  Add comments

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

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

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 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

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

Where to find msApplication-ID and msApplication-PackageFamilyName in your Windows Store App

Code
[sourcecode language=”html”]
<!DOCTYPE html>
<html>
<head>
<meta name="msApplication-ID"content="REVIEW?microsoft.build.App"/>
<meta name="msApplication-PackageFamilyName"content="microsoft.build_8wekyb3d8bbwe"/>
</head>
<body>
<h1>Example connecting your app to the store</h1>
<p>Bring up the bottom app bar and click on</p>
</body>
</html>
[/sourcecode]

Fiddle

  2 Responses to “Connecting your website to your Windows Store App with meta tags”

  1. Sadly, most users don’t know it’s there either, making it almost useless. Regardless, you should consider adding the tags in case IE changes to a more “in your face” approach like iOS has done.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

What is 11 + 14 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)