---
name: "openGroupTimerPage"
mode: "kit"
versionRequirements:
  - { name: "DeviceKit", version: "2.3.1" }
  - { name: "@ray-js/ray", version: "0.6.23" }
platform:
  - "iOS"
  - "Android"
async: true
---

## openGroupTimerPage

> [VERSION] DeviceKit >= 2.3.1 | @ray-js/ray >= 0.6.23

> [PLATFORM] iOS, Android

> ⚡ **Supports Promise** — Returns a Promise when success / fail / complete callbacks are omitted.

### Description

Navigate to the group timer page

### Parameters

| Property | Type | Required | Default | Since | Description |
| --- | --- | --- | --- | --- | --- |
| `groupId` | `string` | Yes | - | `2.3.1` | groupId Group ID |
| `category` | `string` | Yes | - | `2.3.1` | category Timer category |
| `repeat` | `number` | No | - | `2.3.1` | Note: This field is deprecated |
| `data` | `Record<string, any>[]` | Yes | - | `2.3.1` | data DP data {     "dpName": DP name, string     "dpId": DP ID, string     "selected": index of the DP default value, t.Integer     "rangeKeys": value range of the DP, Array<object>     "rangeValues": display range of the DP, Array<string> } |
| `timerConfig` | `TimerConfig` | No | - | `2.3.1` | timerConfig UI configuration |
| `complete` | `() => void` | No | - | - | Completion callback (executed on both success and failure) |
| `success` | `() => void` | No | - | - | Callback on successful API call |
| `fail` | `(params: Object) => void` ↓see below | No | - | - | Failure callback |

#### fail callback parameters

| Property | Type | Description |
| --- | --- | --- |
| `errorMsg` | `string` | Error message |
| `errorCode` | `string \| number` | Error code |
| `innerError` | `Object` | Error extension |

##### fail(params).innerError properties

| Property | Type | Description |
| --- | --- | --- |
| `errorCode` | `string \| number` | Error extension code |
| `errorMsg` | `string` | Error extension message |


### Referenced Types

##### `interface` TimerConfig

| Property | Type | Since | Description |
| --- | --- | --- | --- |
| `background` | `string` | `1.2.6` | background Background color of the timer screen navigation bar, hexadecimal, e.g., FFFFFF |


### Examples

#### Basic usage

```tsx
import { device } from '@ray-js/ray'

const { openGroupTimerPage } = device;

openGroupTimerPage({
  groupId: 'example',
  category: 'example',
  data: [],
  success: () => {
    console.log('openGroupTimerPage success');
  },
  fail: (error) => {
    console.log('openGroupTimerPage fail', error.errorMsg);
  },
});
```
