0

My app sends email notifications on certain activity events. I wish to add link to those emails that will open my custom electron app that has registered protocol (myapp://) if that app exists on user's computer.

If that is not installed on email recipient's computer or protocol is not handled link should open in browser.

I suspect this is not possible, but i really hope i overlooked some great way to do that.

Workarounds are welcome.

Goran Radulovic
  • 1,987
  • 3
  • 16
  • 23
  • 1
    The only way I've achieved this in production is our deployment agency generates a "smart link" which enters the correct link URL based off of users device data. Usually used for App store/play store links. I also don't think there is a way of doing it with a standard url in email – gj-wes Feb 05 '18 at 17:44
  • I second that, there is no way of doing this. One way i can think of is, open a webpage with your link. That page will contain the script to check for iOS or android and serve the correct URL. If it doesnt work it goes to the respective stores. – Syfer Feb 05 '18 at 22:55
  • @Gwesolo that's one of the approaches i've considered and it seems that it will most likely be the solution. So i open the "smart link" in browser and there i detect if there is an app that can open custom protocol (myapp://) and if there is, i try to open the app. If not i open the url in the browser. My question is, how do i detect if there is an app that handles that custom protocol without actually trying to open it? – Goran Radulovic Feb 07 '18 at 15:08
  • @GoranRadulovic, if you havent found it yet, check this [link](https://stackoverflow.com/questions/24779312/simplest-cross-browser-check-if-protocol-handler-is-registered) – Syfer May 20 '18 at 19:10

0 Answers0