Replies: 5 comments 2 replies
-
Have you try https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/communication/authentication?view=net-maui-7.0 ? |
Beta Was this translation helpful? Give feedback.
-
I just ran into the same problem, and eventually found a couple workarounds. One way is to subscribe to Another way is to override |
Beta Was this translation helpful? Give feedback.
-
@mstefarov how can I have the uri to activate the existing window? I can get the tokens back from the uri, but it's not an action like activation, the app still minimized there. And by using the protocol there, the only way is to have the returned uri like: but usually the uri we get from the website is: I'm listing the postman example for your reference, this is not working for my app. |
Beta Was this translation helpful? Give feedback.
-
my vb6 reg program to system Registry code DeleteKey eHKEY_CLASSES_ROOT, ProtocolHead, ComputerName TorF = SetDefaultValue(eHKEY_CLASSES_ROOT, ProtocolHead & "\shell\open\command", Chr(34) & ExeFilePath & Chr(34) & sAvg, ComputerName) End Function`
|
Beta Was this translation helpful? Give feedback.
-
I finally solved this issue, see https://stackoverflow.com/a/79123126/653457 |
Beta Was this translation helpful? Give feedback.
-
I'm a bit confused as to how we're supposed to use protocols in Windows applications. Let's say I have a protocol registered as 'myapp' and call 'myapp://?someparam=somevalue' (or 'myapp:?someparam=somevalue', or 'myapp://path?...', I've tried all three). In the past, I was able to override OnActivated in App.xaml.cs and pull the arguments out of the URI following steps like https://docs.microsoft.com/en-us/windows/uwp/launch-resume/handle-uri-activation.
With MAUI, there is no OnActivated to override in App.xaml.cs. Clicking a protocol link always just opens a new app window. If I override OnLaunched there the 'Arguments' property of LaunchActivatedEventArgs is always empty. If I try to create an OnActivated event handler using the new ConfigureLifecycleEvents method on MauiApp I get an empty Arguments property there too.
So basically two questions: How do I stop protocol activation from opening a new window, and how do I actually get the protocol arguments out of a protocol activation?
Beta Was this translation helpful? Give feedback.
All reactions