OpenUriPortal

class OpenUriPortal(connection: DBusConnection)(source)

Wrapper around the org.freedesktop.portal.OpenURI D-Bus interface. Provides methods to open URIs in the user's preferred application.

Constructors

Link copied to clipboard
constructor(connection: DBusConnection)

Properties

Link copied to clipboard

Returns the interface version.

Functions

Link copied to clipboard

Checks whether a given URI scheme (e.g. "https") is supported. Requires portal version 5 or later.

Link copied to clipboard
suspend fun openUri(uri: String, parentWindow: String = "", ask: Boolean = false): Result<Unit>

Opens a URI (e.g. https://example.com) in the user's preferred application.