Skip to content

Protocol activation in Windows App SDK #10915

Description

@MartinZikmund

i was following this page https://platform.uno/docs/articles/features/protocol-activation.html so i can open my app from the browser until i reached to
protected override void OnActivated(IActivatedEventArgs e)
which uno tells me it doesn't exist when i try to build
image

when i try to get the arguments from OnLaunched it always turn out empty string
image

image

and i try to open the app like this from the browser with url cycoau:youtube and it does open but with empty arguments shouldn't it be youtube or i'm missundertanding something

Originally posted by @ahmed-abdelrazek in #10558

Activity

  1. MartinZikmund commented on Jan 8, 2023

    @MartinZikmund
    MemberAuthor

    The Windows App SDK approach to Protocol Activation is different from UWP, we will need to check how we can support this on our side as well.

  2. added
    kind/enhancement
    project/non-ui ⚙️
    on Jan 10, 2023
  3. ahmed-abdelrazek commented on May 31, 2023

    @ahmed-abdelrazek

    any news on this? @MartinZikmund @jeromelaban

  4. BertrandDeSaintBezier commented on Jul 20, 2023

    @BertrandDeSaintBezier

    In the meantime, here's a functional workaround for this on WinAppSDK : #12933 (reply in thread)

    GitHub
    On Windows, I'm running into an issue where it seems like the OnLaunch() function always starts up a new instance of the application, with all variables reverting to their default values. In the fo...
  5. added
    project/navigation-lifecycle 🧬
    difficulty/medium 🤔
    area/winui
    on Aug 23, 2023
  6. ahmed-abdelrazek commented on Jan 12, 2024

    @ahmed-abdelrazek

    In the meantime, here's a functional workaround for this on WinAppSDK : #12933 (reply in thread)

    GitHub**OnLaunch always starts a new instance of Uno ? · unoplatform/uno · Discussion #12933**On Windows, I'm running into an issue where it seems like the OnLaunch() function always starts up a new instance of the application, with all variables reverting to their default values. In the fo...

    this anwser isn't applicable to the latest version any more but it got me to this
    image

    var activatedEventArgs = AppInstance.GetActivatedEventArgs();
    
    if (activatedEventArgs.Kind == Windows.ApplicationModel.Activation.ActivationKind.Protocol)
    {
        if (activatedEventArgs is Windows.ApplicationModel.Activation.ProtocolActivatedEventArgs protocolActivatedEventArgs)
        {
            argsString = protocolActivatedEventArgs.Uri.ToString();
        }
    }
    

    which gets me what i want on windows( for the WINUI3 app) when i enter the url in the browser didn't test anything else yet
    image

  7. github-actions commented on Aug 7, 2025

    @github-actions
    Contributor

    Hey there — just a heads-up that this issue has been quiet for over a year. If there’s no update or comment in the next 10 days, it’ll be closed automatically. Feel free to remove the stale label or drop a note to keep it open.

  8. added
    stale
    on Aug 7, 2025
  9. ahmed-abdelrazek commented on Aug 7, 2025

    @ahmed-abdelrazek

    Hey there — just a heads-up that this issue has been quiet for over a year. If there’s no update or comment in the next 10 days, it’ll be closed automatically. Feel free to remove the stale label or drop a note to keep it open.

    bad bot

  10. removed
    stale
    on Aug 7, 2025
  11. MartinZikmund commented on Aug 7, 2025

    @MartinZikmund
    MemberAuthor

    This is in progress, PR linked

  12. MartinZikmund commented on Apr 8, 2026

    @MartinZikmund
    MemberAuthor

    Repro generator

    This issue was classified as not reproducible with a code sample or test.

    Reason: This is a feature request/enhancement about protocol activation support in Windows App SDK. It does not describe a bug that can be reproduced with a runtime test or manual sample.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/winuidifficulty/medium 🤔kind/enhancementno-reproproject/navigation-lifecycle 🧬project/non-ui ⚙️

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions