---
sidebar_position: 0
---

# package

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

<details>
    <summary>Package Management Capabilities</summary>
		| Capability | Description |
		|:------------|:-------------|
		| `PACKAGE_INSTALL` | If device supports installing packages |
		| `STOP_PACKAGE` | If device supports stopping packages |

		If you want to check if the device supports those capabilities, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
</details>

## Methods

### install()

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

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

#### Params

| Name          | Type             | Required         | Description                        |
|---------------|------------------|------------------|------------------------------------|
| `baseUrl`     | `string`         |  <div>Yes</div>  | URL where the package is available |
| `packageName` | `string`         |  <div>Yes</div>  | Name of the Android package        |
| `version`     | `string`         |  <div>Yes</div>  | Package version                    |
| `build`       | `string \| null` |  <div>Yes</div>  | 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

<Separator />

### stop()

The `stop()` method stops a certain package.

```ts expandable
stop(packageName: string): Promise<boolean>;
```

#### Params

| Name          | Type     | Required         | Description                 |
|---------------|----------|------------------|-----------------------------|
| `packageName` | `string` |  <div>Yes</div>  | 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

```ts
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');
});

```