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

Question: Why users can't set uwp app as default opener for custom/undeclared file types #2456

Closed
soumyamahunt opened this issue May 16, 2020 · 5 comments
Labels
area-External Not owned by the WinUI team, not actionable in this repository. question

Comments

@soumyamahunt
Copy link

For win32 apps user can provide path of .exe to open a custom file type, this is especially helpful for text editor apps as it is impossible to declare all file types. But in uwp there is no way to do this, currently in this PR, I am implementing desktop extension so user can choose to open file with the extension which then redirects activation to the uwp app, but I am running into issues described here. My question is why isn't this supported by default, why aren't we allowed to support file types based on their content/mime type (which android does)??

@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label May 16, 2020
@0x7c13
Copy link
Member

0x7c13 commented May 16, 2020

One thing I want to add here: It is not possible to even rename a file without extension in UWP.
You can register extensions like ".txt" or ".md" with your app and your app can deal with them nicely but once you use StorageFile.RenameAsync to change a file from "file.txt" to "file", you will get blocked because your app do not have registration for that and there is no way to specify no extension registration with UWP, right?

@soumyamahunt
Copy link
Author

One thing I want to add here: It is not possible to even rename a file without extension in UWP.
You can register extensions like ".txt" or ".md" with your app and your app can deal with them nicely but once you use StorageFile.RenameAsync to change a file from "file.txt" to "file", you will get blocked because your app do not have registration for that and there is no way to specify no extension registration with UWP, right?

Yes, also for Launcher.LaunchFileAsync() if you pass any file type that isn't supported by uwp it won't open even if you specify TargetPackageFamilyName and ContentType in LauncherOptions. It doesn't throw any exception or return any value the execution just stops.

@shaheedmalik
Copy link

They actually added that ability to Windows Insider recently.

What’s new in Build 19608

Improving your default apps experience
Over the years, we’ve made a number of improvements to Settings based on your feedback, and we’re happy to share the next one is starting to roll out. We’re adding the ability to search the lists of file types, protocols, and apps when setting a default.

Showing the Choose default apps by file type Settings window, now with a search box.

This change is currently available for 50% of Insiders in the Fast ring as we evaluate the quality. We’ll let you know when that rollout increases. Please give it a try once it’s available on your device, and let us know what improvements you’d like to see next!
https://blogs.windows.com/windowsexperience/2020/04/15/announcing-windows-10-insider-preview-build-19608/

@soumyamahunt
Copy link
Author

soumyamahunt commented May 16, 2020

They actually added that ability to Windows Insider recently.

That's just adding search ability in default apps settings, that's not what the question is about.

@StephenLPeters StephenLPeters added area-External Not owned by the WinUI team, not actionable in this repository. and removed needs-triage Issue needs to be triaged by the area owners labels May 20, 2020
@jesbis
Copy link
Member

jesbis commented Jun 8, 2020

closing in favor of microsoft/WindowsAppSDK#27

@jesbis jesbis closed this as completed Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-External Not owned by the WinUI team, not actionable in this repository. question
Projects
None yet
Development

No branches or pull requests

6 participants