DesktopInstaller

The DesktopInstaller class is responsible for handling the installation of applications on desktop operating systems such as Windows, Linux, and macOS. This class implements the AppInstaller interface and provides platform-specific installation logic for each supported operating system.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open suspend override fun canRequestInstallPackages(): Boolean

Determines whether the application can request permission to install packages depending on the operating system being used.

Link copied to clipboard
open suspend override fun installApp(appFile: File, onResult: (Boolean, String?) -> Unit)

Installs a given application file based on the detected operating system. The method supports multiple platforms (Windows, Linux, Mac) and uses platform-specific installation mechanisms. If the operating system is unsupported, the installation fails with an appropriate message.

Link copied to clipboard
open suspend override fun requestInstallPackagesPermission()

Requests the necessary permission to install packages based on the detected operating system.

Link copied to clipboard
open suspend override fun uninstallApp(onResult: (success: Boolean, message: String?) -> Unit)

Uninstalls the actual application from the device.

open suspend override fun uninstallApp(packageName: String, onResult: (success: Boolean, message: String?) -> Unit)

Uninstalls an application based on the provided package name.