beeware / beeware/briefcase

Add support for Custom URI Schemes

Open
#623 4 comments 0 reactions 0 assignees View on GitHub
enhancement not quite right
Dominant language
Python
Stars
3.3k
Forks
549
Avg merge
1d 4h
Merged PRs (30d)
40

Description

**Is your feature request related to a problem? Please describe.**
Some applications might want to register a custom URI on the system, for example when you go to `example://thing` it can launch the app. This may be useful when you want to launch an app from a web page. As Custom URIs support parameters, you can even pass query strings like normal URLs.

**Describe the solution you'd like**
As far I know, all operating systems are already supports custom URI handlers. Some of them are:
* Android - with modifying the manifest (Android calls as [Deep Linking](https://developer.android.com/training/app-links/deep-linking))
* Windows - [by modifying the Registry](https://docs.microsoft.com/en-us/windows/win32/search/-search-3x-wds-ph-install-registration#installing-and-registering-a-protocol-handler)
* Linux - by adding `MimeType=x-scheme-handler/example;` entry to `.desktop` file

As beeware's own cookiecutter templates contains files for setting build configuration, a `uri-schemes` option can be added to `[tool.briefcase]` setting, then inject scheme handler with cookiecutter templates.

```toml
[tool.briefcase.app.example]
formal_name = "Example"
description = "An example app."
author = "Yusuf Cihan"
uri-schemes = [
"example" # Will register "example://" to system.
]
```

I'm considering creating a PR for this feature, but I still wanted to create this issue, as someone might be able to add this feature faster than I can.

**Describe alternatives you've considered**
I'm currently cloning the cookiecutter templates from beeware's own repositories and replacing .wxs and .desktop files with my modified files, however if briefcase had a configuration itself that adds required keys to build files, it would be very easy.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.