microsoft / microsoft/WindowsAppSDK

Specifying as default file handler with content type instead of filetype

Open
#27 9 comments 7 reactions 1 assignee Claimed by @stevewri View on GitHub
area-Activation feature proposal
Dominant language
C++
Stars
4.7k
Forks
471
Avg merge
3d 13h
Merged PRs (30d)
28

Description

# Proposal: Specifying as default file handler with content type instead of filetype

## Summary

Already asked in microsoft/microsoft-ui-xaml#2456 due to no proper channel to ask. Right now uwp devs have to extensively declare filetypes in manifest if they want their app to be default handler of that filetype. Instead content type should be declared in the manifest and app can be default handler of all files that have the declared content type.

## Rationale

Declaring all filetypes is really taxing and in some cases like for a text editor app impossible to do. Instead declaring content type makes it easier for devs. Also in case of win32 apps, user can simply provide executable path to open the file with their app of choice but in case of uwp users can't choose it to default handler of unsupported filetypes. Current filetype association can be kept for silent take over as default handler also giving special icons to some filetypes.
* Enable broad range of filetype support without much difficulty.
* `StorageFile` methods like renaming file fails if trying to rename the file to a unsupported filetype as described in [here](https://github.com/microsoft/microsoft-ui-xaml/issues/2456#issuecomment-629611273).
* `StorageFile.GetFileAsync()` fails for unsupported file types. This is useful to users as this enables them to open files from command line or WSL environments with uwp app.
* Also, `Launcher.LaunchFileAsync()` fails if the filetype is undeclared which I observed when I tried to implement desktop extension in JasonStein/Notepads#534 to enable users to launch custom filetype with this app.

## Scope

| Capability | Priority |
| :---------- | :------- |
| Declaring default file handler via content type | Must |
| Ability to change content type of file in open with menu | Should |

## Open Questions

Should user be able set app as default handler of any kind of file like they can do so with win32?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.