url_handlers may be the best way to achieve this.
You can also use the externally_connectable manifest property to declare that your site can connect to your application, then call chrome.runtime.sendMessage or chrome.runtime.connect from your web page and process it in the chrome.runtime.onMessage handler in the application .
Which one works best depends on your needs. url_handlers is an easier way, but it will constantly assign the URL of your link to your application, so you cannot use it for anything else if the application is installed. externally_connectable more complicated, but it allows much more complex bidirectional communication between your website and application.
You can even use a combination of the two approaches if you need to: launch the application using the url_handlers function, and then establish the communication channel to the website after the application starts and starts.
source share