Replies: 1 comment
-
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? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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 ?
Beta Was this translation helpful? Give feedback.
All reactions