Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deep linking to specific pages does not work #1300

Closed
niels9001 opened this issue May 30, 2023 · 2 comments · Fixed by #1304
Closed

Deep linking to specific pages does not work #1300

niels9001 opened this issue May 30, 2023 · 2 comments · Fixed by #1304
Assignees
Labels
bug Something isn't working

Comments

@niels9001
Copy link
Collaborator

Which version of the app?

WinUI 3 Gallery

Description

Deep linking doesn't work.

Steps to reproduce:

  • Go to any page
  • Click the "Copy link" button.
  • Open Run prompt, copy-and-paste and hit enter
  • WinUI opens, but doesn't navigate to the correct page

Related: #1164

Screenshots

No response

Windows version

No response

Additional context

No response

@niels9001 niels9001 added the bug Something isn't working label May 30, 2023
@niels9001 niels9001 self-assigned this May 30, 2023
@marcelwgn
Copy link
Collaborator

I think this is an issue with the protocol activation which just seems to be entirely broken. There is/was #979 but that didn't get far :/

@niels9001
Copy link
Collaborator Author

I think this is an issue with the protocol activation which just seems to be entirely broken. There is/was #979 but that didn't get far :/

Correct, we should be using the new APIs introduced for WinAppSDK: https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.appinstance.getactivatedeventargs?view=windows-app-sdk-1.3#microsoft-windows-applifecycle-appinstance-getactivatedeventargs

var eventargs = Microsoft.Windows.AppLifecycle.AppInstance.GetCurrent().GetActivatedEventArgs();

if (eventargs.Kind is ExtendedActivationKind.Protocol && eventargs.Data is ProtocolActivatedEventArgs)
{
      ProtocolActivatedEventArgs ProtocolArgs = eventargs.Data as ProtocolActivatedEventArgs;
      var uri = ProtocolArgs.Uri;
}

@marcelwgn marcelwgn mentioned this issue Jun 12, 2023
3 tasks
@niels9001 niels9001 assigned marcelwgn and unassigned niels9001 Jun 19, 2023
karkarl pushed a commit that referenced this issue Nov 1, 2023
<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->
Simplifies protocol activation,, sorry for the new line changes.

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
Closes #1300, Closes #1164
karkarl pushed a commit that referenced this issue Jul 15, 2024
<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->
Simplifies protocol activation,, sorry for the new line changes.

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
Closes #1300, Closes #1164
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants