How to integrate other apps into Flatpak app?

Hello,

Let say a have Flatpak apps “AAA” that want to open a PDF reader for reading documentation or what ever, how do I do this? Do I have to include that PDF reader into Flatpak apps AAA?

But if I already have Flatpak PDF reader installed? Can I make AAA call external Flatpak PDF reader instead?

Would flatpak-spawn work in this case?

Thanks.

1 Like

Hello,

If you want to open the file with the default application on the system use gtk_show_uri_on_window.

If you want to let the user choose with which application to open the file you can use GtkAppChooserDialog.

Otherwise, have a look at this issue https://github.com/flatpak/xdg-desktop-portal/issues/283 .

2 Likes

Thanks, will look into it.

If you want to let the user choose with which application to open the file you can use GtkAppChooserDialog.

Or just use the OpenURI portal https://flatpak.github.io/xdg-desktop-portal/portal-docs.html#gdbus-method-org-freedesktop-portal-OpenURI.OpenURI