# App context

### app.getInfo()

Get current app information

#### Parameters:

None

#### Return value：

| Parameter name | Type    | Description        |
| -------------- | ------- | ------------------ |
| name           | String  | App name           |
| versionName    | String  | App version name   |
| versionCode    | Integer | App version number |
| logLevel       | String  | Log level          |
| source `101+`  | Object  | App source         |

##### source `101+`

| Parameter name | Type   | Description                                                                                                        |
| -------------- | ------ | ------------------------------------------------------------------------------------------------------------------ |
| packageName    | String | Source app package name, first level source                                                                        |
| type           | String | Source type, second level source, the values are `shortcut`, `push`, `url`, `barcode`, `nfc`, `bluetooth`, `other` |
| extra          | Object | Other source-related information related to the type. Extras will be different for different types                 |

#### Example:

```js
app.getInfo().then(res => {
  console.log(res)
})
```

### app.exit()

Exit ths app

#### Parameters:

None

#### Return value：

| Parameter name | Type   | Description |
| -------------- | ------ | ----------- |
| data           | String | success     |

#### Example:

```js
app.exit()
```

### app.query()

Exit ths app

#### Parameters:

None

#### Return value：

| Parameter name | Type   | Description       |
| -------------- | ------ | ----------------- |
| data           | String | get the app query |

#### Example:

```js
app.query()
```

# Ringtone

### ringtone.playTone()

Play system default sound

#### Parameters:

None

#### Return value：

| Parameter name | Type   | Description |
| -------------- | ------ | ----------- |
| index          | Number | sound index |

#### Example:

```js
ringtone.playTone()
```
