- Notifications
You must be signed in to change notification settings - Fork3
feat: add support for URI activations for coder scheme#72
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks good!
// Register for URI handling (known as "protocol activation") | ||
#if DEBUG | ||
const string scheme = "coder-debug"; | ||
#else | ||
const string scheme = "coder"; | ||
#endif | ||
var thisBin = Assembly.GetExecutingAssembly().Location; | ||
ActivationRegistrationManager.RegisterForProtocolActivation(scheme, thisBin + ",1", "Coder Desktop", ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Is it typical for apps to register themselves? Or is it more common for it to be registered in the installer (not sure if this is even an option)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The installer could do it, but I'm not sure it provides any advantage.
One advantage of the App registering itself is that you don't need to install to debug, which is nice.
We might want to cosiderunregistering in the uninstaller, which I can look into in another PR.
bd221c4
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
relates to#52
Adds support for Coder Desktop to handle the
coder:/
URI scheme by registering for this scheme and forwarding activations to the single instance of Coder Desktop.Also removes the
Package.appxmanifest
. It is unused since Coder Desktop is not a packaged app.