# Device service

### `activateDeviceService`

**Description**

Activate the current device service for data collection.

**Parameters**

* `identity` (Identity): The identity for activation.

**Returns**

* `Promise<any>`: A promise that resolves when the operation is complete.

Usage example:

```typescript
import { activateDeviceService, Identity } from "ims-react-native/src";

const identity = new Identity("API_KEY", "EXTERNAL_REFERENCE_ID");

activateDeviceService(identity).then((result: string) => {
        console.log(result);
      }).catch((error: Error) => {
        console.log(error.message);
    });
```

### `deactivateDeviceService`

**Description**

Deactivate the current device for data collection. It may be desirable to deactivate a device if the host application's user logs out or if the user becomes inactive.

**Parameters**

* `identity` (Identity): The identity for deactivation.

**Returns**

* `Promise<any>`: A promise that resolves when the operation is complete.

Usage example:

```typescript
import { deactivateDeviceService, Identity } from "ims-react-native/src";

const identity = new Identity("API_KEY", "EXTERNAL_REFERENCE_ID");

deactivateDeviceService(identity).then((result: string) => {
        console.log(result);
      }).catch((error: Error) => {
        console.log(error.message);
    });
```

### `fetchDeviceService`

**Description**

Fetch the current Device's model.

**Parameters**

* `identity` (Identity): The identity for fetching the current Device's model.

**Returns**

* `Promise<any>`: A promise that resolves with the current Device's model.

Usage example:

```typescript
import { fetchDeviceService, Identity } from "ims-react-native";

const identity = new Identity("API_KEY", "EXTERNAL_REFERENCE_ID");

fetchDeviceService(identity).then((result: string) => {
        console.log(result);
      }).catch((error: Error) => {
        console.log(error.message);
    });
```
