Agent Shoulder Agent Shoulder - 2 years ago 207
HTML Question

How to open Chrome App from web link

I'm trying to create just a simple html link to open a Chrome app when clicking it. Lets use the following example:

I have installed the app found at

If I open the app from the Chrome menus, it will open the app in a new browser tab, displaying chrome-extension://cnciopoikihiagdjbjpnocolokfelagl/app.html as the URL in the address field.

So, naively I thought that I could just specify that URL to make it open if the link is clicked, i.e:

<a href="chrome-extension://cnciopoikihiagdjbjpnocolokfelagl/app.html">Link to the installed Chrome App</a>

But that does not work. How should I do to link correctly to the (installed) app?

Xan Xan
Answer Source

If you were in control of the app in question, you could use externally_connectable property and listen for requests to launch your app.

But it seems like you don't control that app. Normal webpage code is unprivileged and cannot call chrome-extension:// URLs and the like.

You could potentially make a launcher extension. Using the management API you can launch the app with"cnciopoikihiagdjbjpnocolokfelagl");

and that can, again, be triggered via web-to-extension messaging using externally_connectable. But that obviously requires that your users have two distinct Chrome add-ons installed, the app in question and your launcher shim.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download