Skip to main content
Version: 8.2.2

package

The sos.management.package API groups together methods for installing custom Android packages.

Package Management Capabilities
CapabilityDescription
PACKAGE_INSTALLIf device supports installing packages
STOP_PACKAGEIf device supports stopping packages

If you want to check if the device supports those capabilities, use sos.management.supports().

Methods

install()

The install() method installs a particular package from the specified URL.

install(baseUrl: string, packageName: string, version: string, build: string | null): Promise<void>;

Params

NameTypeRequiredDescription
baseUrlstring
Yes
URL where the package is available
packageNamestring
Yes
Name of the Android package
versionstring
Yes
Package version
buildstring | null
Yes
If relevant for your device

Return value

A promise that resolves when the package is successfully installed.

Possible errors

  • If baseUrl is not a valid URL
  • If packageName is not a string
  • If version is not a string
  • If build is not a string or null

stop()

The stop() method stops a certain package.

stop(packageName: string): Promise<boolean>;

Params

NameTypeRequiredDescription
packageNamestring
Yes
Name of the android package

Return value

Resolves to true if the package was stopped, false if the package was already stopped before.

API Example

import { sos } from '@signageos/front-applet';

void sos.onReady(async () => {
await sos.management.package.install('https://cdn.your-cms.com', 'io.signageosWebView.app.ota', '2.4.0', 'benq');
await sos.management.package.stop('io.signageosWebView.app.ota');
});