How I can use "appname://some?option=val" in edge to launch my app? #7844
-
I want my application to achieve such functionality: it can be invoked through a third party/Url and accept some parameters. At first, I was studying how to make the packaged app.exe accept parameters when calling. Later I learned that Cutsom Protocol can implement URL calling applications. I've seen discussions involving Custom Protocol, and compared the use of the localhost plugin, but these confused me even more: how do I modify the configuration to allow the custom protocol, how do I write main.rs to accept parameters to start/revoke the application, and How to accept parameters in frontend (Node). I also tried the deep-link plugin, but it didn't work. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
That's unfortunate because that's exactly what you're asking for! Any specific issues you hit that you can share so we can figure out what went wrong? |
Beta Was this translation helpful? Give feedback.
Okay, first of all you're still registering my-scheme as the link scheme, so in case that's not just a copy paste error on github you have to change that.
Secondly, you may have to use all lowercase on the browser side (you can use any casing to register it tho) -> What i mean is that even tho you register it as
TeyvatGuide
the browser will redirect that toteyvatguide
which may cause problems so may as well enterteyvatguide
in the browser directly.Lastly, if you let the link start your app, the event you send to the frontend will be lost since the listener won't be registered at that point.
( All the above was from testing your code on my end. After applying my suggestions it works for…