Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[Feature Request] Fallback URI to OpenURI #1110

Closed
ramcq opened this issue Sep 21, 2023 · 1 comment
Closed

[Feature Request] Fallback URI to OpenURI #1110

ramcq opened this issue Sep 21, 2023 · 1 comment
Labels
needs discussion Needs discussion on how to implement or fix the corresponding task new api This requires adding API to an existing portal portal: openuri OpenURI portal

Comments

@ramcq
Copy link

ramcq commented Sep 21, 2023

A Java application which is hoping to support Flatpak has this code: https://github.com/fedi-to/fedicraft/blob/default/src/main/java/net/fedi_to/fc/os/NonWinMac.java which launches xdg-open if there is a scheme handler available, and launches a fallback URL (helping the user to install whatever is needed, etc) if not.

My first suggestion was to simply remove the check and call xdg-open, expecting an error to be returned in the case there is no handler. However, unlike the unsandboxed xdg-open (which returns 4 in this case), the sandboxed xdg-open wrapper apparently succeeds and returns 0, because the portal (at least here on GNOME) presents a dialog to the user to select or install an app.

Is there some way for the application to distinguish these two cases and guide the user accordingly? Or could we add a fallback URI property to the Open URI method, analagous to https://learn.microsoft.com/en-us/uwp/api/windows.system.launcheroptions.fallbackuri?view=winrt-22621#windows-system-launcheroptions-fallbackuri ?

@GeorgesStavracas GeorgesStavracas added needs discussion Needs discussion on how to implement or fix the corresponding task new api This requires adding API to an existing portal portal: openuri OpenURI portal labels Oct 6, 2023
@Mikenux
Copy link

Mikenux commented Nov 26, 2023

Is it about installing specific things? Specific extensions or specific flatpak apps?

For a fallback URI there is this PR: #1203. It concerns #1202. If this applies to mime types, then with this the app can probably instead ask to open a web link if the portal responds there is no scheme?

@flatpak flatpak locked and limited conversation to collaborators Dec 27, 2023
@GeorgesStavracas GeorgesStavracas converted this issue into discussion #1250 Dec 27, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
needs discussion Needs discussion on how to implement or fix the corresponding task new api This requires adding API to an existing portal portal: openuri OpenURI portal
Projects
Status: Triaged
Development

No branches or pull requests

3 participants