Summary:
Most of the operation systems today knows how to handle a call to a very specific list of protocols.
Examples,
All OS will automatically suggest your default browser for serving http or https protocol. e.g. command prompt: start https://google.com command open browser. Similarly adding href with mailto:// URL will automatically opens mail app,callto:// executes caller application.The above given example are of some of predefined protocols.


Then we have custom protocols,E.g Defining protocol on Windows
1> Open cmd and execute regedit
2>Enter HKEY_CLASSES_ROOT directory
3>Adding directory name as you protocol name in HKEY_CLASSES_ROOT.
4> Add an anonymous¹ entry typed REG_SZ with the title of your applications.
(It will be shown in any popup of the browser, should be user friendly)
5>Add an entry named URL Protocol typed REG_SZ without any value
(this is the protocol name later be used)
6>Add directory named shell in you new protocol directory
7>Add the command to the following Directory
HKEY_CLASSES_ROOT
alert
(Default) = “URL:Alert Protocol”
URL Protocol = “”
DefaultIcon
(Default) = “alert.exe,1”
shell
open
command
(Default) = “C:\Program Files\Alert\alert.exe” “%1”
shell
open
command

8>Add and entry named command in the open directory above
9>Add an anonymous entry typed REG_SZ with the path of your application executable
10> Execute the custom protocol in your browser
our-protocol-name:// we can also add parameters to the command for e.g protocol://
or itapp://app.store//subway-surfers/id12356

Executing ios Apps :
Configure Mobile Ios Variables refer to this link .Add Url Scheme parameter and add variable to the App.
After Configuring these parameters client side Web app can use the custom protocol as href tag or as a windows location to redirect to the app for e.g
window.location.replace(“instagram://”);
or as an href=”instagram://” which executes the app if found we can use try and catch method to open the app or redirect the user to appstore if the following ios is not installed
Link to pre-defined protocols
Link to custom-protocol Documentation

Leave a Reply

Your email address will not be published. Required fields are marked *