I am writing a protocol handler to launch a java application, calling a command like java -jar myApp '%1'. Currently I have implemented it for Chrome and it looks work correcly. Unfortunately I don't have the same behavior for Firefox and IE (weird uh?! X-D )
Here my implementation.
The protocol is named dgh. During the first installation my application set the following keys in windows registry
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\dgh]
@="URL:DgHome Protocol"
"URL Procol"=""
[HKEY_CLASSES_ROOT\dgh\DefaultIcon]
@="C:/DGHOME/IPlusConf.exe,1"
[HKEY_CLASSES_ROOT\dgh\shell]
[HKEY_CLASSES_ROOT\dgh\shell\open]
[HKEY_CLASSES_ROOT\dgh\shell\open\command]
@="java -jar C:/DGHOME/Pch/lib/pch.teleconsulto.jar \"%1\""
On chrome this is enough. On Firefox, I had to add some configurations in about:config.Following MDN on Firefox I set the following
network.protocol-handler.expose.dgh;true
network.protocol-handler.external.dgh;true
network.protocol-handler.warn-external.dgh;false
In this way firefox at least ask to me if I want launch an application and ask to me to select one: I don't want that, I would it call the command I set and advise the first time the user about that:
On IE nothing happens, it says can't open the web page reference by my link.
Here a set of link I used as test
<a href="dgh://call/open?id='kit1.teleconsulto'">Open call to kit1.teleconsulto</a>
<a href="dgh://teleconsult/start?id='kit1.teleconsulto'">
Open teleconsult to kit1.teleconsulto</a>
<a href="dgh://call/close">Close call</a>
<a href="dgh://call/end">Close client</a>
<a href="dgh://stethoscope/start">On Phonendo</a>
here some references: Installing and Registering Protocol Handlers http://msdn.microsoft.com/en-us/library/aa767916%28VS.85%29.aspx
I hope sincerely someone can help me