Answered by:
How do I launch a Metro app from another HTML/JavaScript Metro app?

Question
-
I would like to launch a Metro application (app #2) from another Metro application (app #1) - is this possible? Ideally, if the app #2 is not installed, then the user would be taken to the Store to app #2 install page.
I saw this thread -
How to know if an app is installed?
http://social.msdn.microsoft.com/Forums/en-US/winappswithhtml5/thread/b0313451-b4de-4f7c-9124-b3c2f45225d8but it mentioned file associations and was a bit differently, so I thought I'd ask here.
I also checked PackageManager (http://msdn.microsoft.com/en-us/library/windows/apps/windows.management.deployment.packagemanager.aspx) - but it can only be used by desktop apps.
If not directlly possible through winRT, could I create an assembly in C# that could be used by the HTML/JavaScript Metro app?
Friday, April 27, 2012 12:20 AM
Answers
-
The reply in the other thread you linked is accurate. Metro style apps cannot launch another specific app, thus the direct Store linkage supported. Launching another app is supported through file type associations and protocol associations, and this means that the user is always able to select which app is launched to support the association, and can change it at any time.
To answer your last question, you can create assemblies in C#/VB, as well as DLLs in C++, that can be used from a JS app. See the tutorials on http://msdn.microsoft.com/en-us/library/windows/apps/hh441572(v=vs.110).aspx.
- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Friday, April 27, 2012 4:26 PM
- Marked as answer by Emmanuel Huna Friday, May 4, 2012 8:35 PM
Friday, April 27, 2012 3:47 PM
All replies
-
The reply in the other thread you linked is accurate. Metro style apps cannot launch another specific app, thus the direct Store linkage supported. Launching another app is supported through file type associations and protocol associations, and this means that the user is always able to select which app is launched to support the association, and can change it at any time.
To answer your last question, you can create assemblies in C#/VB, as well as DLLs in C++, that can be used from a JS app. See the tutorials on http://msdn.microsoft.com/en-us/library/windows/apps/hh441572(v=vs.110).aspx.
- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Friday, April 27, 2012 4:26 PM
- Marked as answer by Emmanuel Huna Friday, May 4, 2012 8:35 PM
Friday, April 27, 2012 3:47 PM -
I don't know if this document is up-to-date, but the Remarks section says that if the system cannot find a default app for the file type, "Windows helps the user acquire an app from the Windows Store."Friday, April 27, 2012 4:14 PM
-
Good point. Yes, that topic is up to date, but it's not a means to tell the Store to find a specific app. The best you can do is create a very specific file type or protocol such that it would be unlikely another app would support it. However, if it was a compelling scenario, another app can come in and offer itself as the target app as well, and it will show up as an equivalent in the Store.
What isn't supported is launching or finding another app by its name or some other unique identity. Only association.
Friday, April 27, 2012 4:29 PM -
Following up on this thread, is there a way to link to a specific app in the store from a web page?
Update: found the answer here - http://msdn.microsoft.com/en-us/library/ie/hh781489(v=vs.85).aspx- Edited by Emmanuel Huna Friday, May 4, 2012 9:08 PM
Friday, May 4, 2012 8:36 PM