portals icon indicating copy to clipboard operation
portals copied to clipboard

Implement a "default apps" agent and/or portal

Open cassidyjames opened this issue 6 years ago • 5 comments

I.e. when installing a web browser, it should be able to use a standard way to request to be set as the default. I'm not sure if a portal exists for this or not.

cassidyjames avatar May 06 '19 20:05 cassidyjames

Gonna move this to the portals repo

danirabbit avatar Sep 27 '19 18:09 danirabbit

I think this should be done by appcenter rather than by the app itself. Otherwise you just get software constantly pestering you to be the default.

TingPing avatar Sep 27 '19 19:09 TingPing

Well we could build in a "Never ask me again" mechanism to the dialog like we do with (for example) the content warning dialog.

I do think this is a feature that apps like browsers want to have and have made kind of a norm. Do we have prior art for this on Android or other OS's?

danirabbit avatar Sep 27 '19 20:09 danirabbit

On Android it's a mechanism that's provided by the OS:

  • If there's only one app that's registered as a certain type of link or file handler, that app just opens
  • If there's more than one app, then the next time that link or file type is attempted to be opened, an agent asks which of the apps the user would like to use, and they can choose if it's just this once (the default) or always
  • The user can go into the system settings later and reset those defaults per-app if they'd like

I'm not sure that exact flow would work or be desirable for elementary OS since it's possible to leave no app explicitly handling a protocol, and be asked every time. I also don't know that apps really "ask" to support a certain link/file type, they just declare support in the app metadata (equivalent to declaring support in the .desktop, I guess) and the OS takes care of the rest.

cassidyjames avatar Sep 27 '19 22:09 cassidyjames

On Android it's a mechanism that's provided by the OS:

  • If there's only one app that's registered as a certain type of link or file handler, that app just opens
  • If there's more than one app, then the next time that link or file type is attempted to be opened, an agent asks which of the apps the user would like to use, and they can choose if it's just this once (the default) or always
  • The user can go into the system settings later and reset those defaults per-app if they'd like

Well, that's basically the OpenURI Portal, the diferences are:

We don't list portals permissions in switchboard right now, but we should.

I'm not sure that exact flow would work or be desirable for elementary OS since it's possible to leave no app explicitly handling a protocol, and be asked every time. I also don't know that apps really "ask" to support a certain link/file type, they just declare support in the app metadata (equivalent to declaring support in the .desktop, I guess) and the OS takes care of the rest.

Well, what apps can do is show a link to settings://applications/defaults and ask to user to set it as default.

Marukesu avatar Oct 07 '21 22:10 Marukesu