Answer the question
In order to leave comments, you need to log in
How to register a protocol for opening an application from a browser?
For example, to open my application on Electron using the url myapp://open. MacOS
Answer the question
In order to leave comments, you need to log in
When an application is installed, it must register its Scheme with the browser.
General information www.openintents.org/intentsregistry
Examples for iOS/Android https://stackoverflow.com/questions/11421048/andro...
Answer for Windows (not Mac OS, but suddenly someone will come in handy or you decide to port):
1. Create the HKCR\[uri-schemename] key in the registry (for example, HKCR\myapp)
2. Write a description in the default string parameter (any , for example URL:My APP)
3. Create a URL Protocol string parameter without a value
4. Create the key HKCR\[uri-schemename]\DefaultIcon
5. Write the path to the icon file in the default string parameter, for example, C:\Program Files\My APP\MyApp.exe,0 (0 here is the index number of the icon in the file)
6. Create the key HKCR\[uri-schemename]\shell\open\command
7. Write the command to launch the application in the default string parameter " C:\Program Files\My APP\MyApp.exe" "%1" (%1 here are the passed command line attributes)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question