portals
portals copied to clipboard
Implement a "default apps" agent and/or portal
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.
Gonna move this to the portals repo
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.
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?
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.
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:
- There's no always option, to set a app as the default you need to choose them three times.
- Only few uri schemes uses the system default. For all others, if there's more than one app, the app chooser is shown .
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.