@doubao-apps/create 0.0.26 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/36.js +4 -4
- package/dist/template-empty/.ai/examples/common-patterns.md +53 -43
- package/dist/template-empty/.ai/examples/component-basics.md +0 -17
- package/dist/template-empty/.ai/guides/component-development.md +96 -214
- package/dist/template-empty/.ai/guides/system-prompt.md +14 -14
- package/dist/template-empty/.ai/reference/framework-api-quick-ref.md +46 -85
- package/dist/template-empty/.ai/reference/open-api/01-/345/237/272/347/241/200-/350/264/246/345/217/267-/347/263/273/347/273/237.md +13 -13
- package/dist/template-empty/.ai/reference/open-api/{02-storage.md → 02-/345/255/230/345/202/250.md} +13 -21
- package/dist/template-empty/.ai/reference/open-api/{03-router.md → 03-/350/267/257/347/224/261.md} +9 -9
- package/dist/{template-starter/.ai/reference/open-api/04-ui- → template-empty/.ai/reference/open-api/04-/347/225/214/351/235/242-}/344/272/244/344/272/222.md +12 -12
- package/dist/template-empty/.ai/reference/open-api/05-/347/225/214/351/235/242-/350/276/223/345/205/245.md +42 -0
- package/dist/template-empty/.ai/reference/open-api/06-/347/275/221/347/273/234.md +148 -0
- package/dist/template-empty/.ai/reference/open-api/{07-media.md → 07-/345/252/222/344/275/223.md} +8 -8
- package/dist/template-empty/.ai/reference/open-api/{08-open- → 08-/345/274/200/346/224/276/350/203/275/345/212/233-}/344/270/232/345/212/241/350/203/275/345/212/233.md +83 -14
- package/dist/{template-starter/.ai/reference/open-api/09-device-bluetooth.md → template-empty/.ai/reference/open-api/09-/350/256/276/345/244/207-/350/223/235/347/211/231.md} +22 -46
- package/dist/{template-starter/.ai/reference/open-api/10-device-wi-fi.md → template-empty/.ai/reference/open-api/10-/350/256/276/345/244/207-wi-fi.md} +9 -9
- package/dist/template-empty/.ai/reference/open-api/11-/350/256/276/345/244/207-/345/212/240/351/200/237/345/272/246/350/256/241.md +104 -0
- package/dist/template-empty/.ai/reference/open-api/12-/350/256/276/345/244/207-ibeacon.md +148 -0
- package/dist/template-empty/.ai/reference/open-api/13-/350/256/276/345/244/207-/347/275/227/347/233/230.md +82 -0
- package/dist/template-empty/.ai/reference/open-api/14-/350/256/276/345/244/207-/350/256/276/345/244/207/346/226/271/345/220/221.md +70 -0
- package/dist/template-empty/.ai/reference/open-api/15-/350/256/276/345/244/207-/351/231/200/350/236/272/344/273/252.md +104 -0
- package/dist/template-empty/.ai/reference/open-api/16-ui-/350/276/223/345/205/245.md +65 -0
- package/dist/template-empty/.ai/reference/open-api/17-/350/256/276/345/244/207-/347/275/221/347/273/234.md +164 -0
- package/dist/template-empty/.ai/reference/open-api/18-/350/256/276/345/244/207-/347/237/255/344/277/241.md +62 -0
- package/dist/template-empty/.ai/reference/open-api/19-/350/256/276/345/244/207-/346/227/240/351/232/234/347/242/215.md +43 -0
- package/dist/template-empty/.ai/reference/open-api/20-/350/256/276/345/244/207-/347/224/265/346/261/240.md +83 -0
- package/dist/template-empty/.ai/reference/open-api/21-/350/256/276/345/244/207-/346/227/245/345/216/206.md +215 -0
- package/dist/template-empty/.ai/reference/open-api/22-/350/256/276/345/244/207-/345/211/252/350/264/264/346/235/277.md +70 -0
- package/dist/template-empty/.ai/reference/open-api/23-/350/256/276/345/244/207-/350/201/224/347/263/273/344/272/272.md +270 -0
- package/dist/template-empty/.ai/reference/open-api/24-/350/256/276/345/244/207-/345/212/240/345/257/206.md +56 -0
- package/dist/template-empty/.ai/reference/open-api/25-/350/256/276/345/244/207-/347/224/265/350/257/235.md +41 -0
- package/dist/template-empty/.ai/reference/open-api/26-/350/256/276/345/244/207-/346/211/253/347/240/201.md +100 -0
- package/dist/template-empty/.ai/reference/open-api/27-/350/256/276/345/244/207-/345/261/217/345/271/225.md +173 -0
- package/dist/template-empty/.ai/reference/open-api/28-/350/256/276/345/244/207-/351/234/207/345/212/250.md +66 -0
- package/dist/template-empty/.ai/reference/open-api/README.md +27 -11
- package/dist/template-empty/.ai/reference/open-api.md +275 -8
- package/dist/template-empty/.ai/rules/dos-and-donts.md +50 -37
- package/dist/template-empty/AGENTS.md +54 -31
- package/dist/template-empty/README.md +57 -10
- package/dist/template-empty/package.json +2 -2
- package/dist/template-empty/src/app.config.ts +6 -0
- package/dist/template-empty/src/app.ts +0 -6
- package/dist/template-empty/tsconfig.json +2 -0
- package/dist/template-starter/.ai/examples/common-patterns.md +53 -43
- package/dist/template-starter/.ai/examples/component-basics.md +0 -17
- package/dist/template-starter/.ai/guides/component-development.md +96 -214
- package/dist/template-starter/.ai/guides/system-prompt.md +14 -14
- package/dist/template-starter/.ai/reference/framework-api-quick-ref.md +46 -85
- package/dist/template-starter/.ai/reference/open-api/01-/345/237/272/347/241/200-/350/264/246/345/217/267-/347/263/273/347/273/237.md +13 -13
- package/dist/template-starter/.ai/reference/open-api/{02-storage.md → 02-/345/255/230/345/202/250.md} +13 -21
- package/dist/template-starter/.ai/reference/open-api/{03-router.md → 03-/350/267/257/347/224/261.md} +9 -9
- package/dist/{template-empty/.ai/reference/open-api/04-ui- → template-starter/.ai/reference/open-api/04-/347/225/214/351/235/242-}/344/272/244/344/272/222.md +12 -12
- package/dist/template-starter/.ai/reference/open-api/05-/347/225/214/351/235/242-/350/276/223/345/205/245.md +42 -0
- package/dist/template-starter/.ai/reference/open-api/06-/347/275/221/347/273/234.md +148 -0
- package/dist/template-starter/.ai/reference/open-api/{07-media.md → 07-/345/252/222/344/275/223.md} +8 -8
- package/dist/template-starter/.ai/reference/open-api/{08-open- → 08-/345/274/200/346/224/276/350/203/275/345/212/233-}/344/270/232/345/212/241/350/203/275/345/212/233.md +83 -14
- package/dist/{template-empty/.ai/reference/open-api/09-device-bluetooth.md → template-starter/.ai/reference/open-api/09-/350/256/276/345/244/207-/350/223/235/347/211/231.md} +22 -46
- package/dist/{template-empty/.ai/reference/open-api/10-device-wi-fi.md → template-starter/.ai/reference/open-api/10-/350/256/276/345/244/207-wi-fi.md} +9 -9
- package/dist/template-starter/.ai/reference/open-api/11-/350/256/276/345/244/207-/345/212/240/351/200/237/345/272/246/350/256/241.md +104 -0
- package/dist/template-starter/.ai/reference/open-api/12-/350/256/276/345/244/207-ibeacon.md +148 -0
- package/dist/template-starter/.ai/reference/open-api/13-/350/256/276/345/244/207-/347/275/227/347/233/230.md +82 -0
- package/dist/template-starter/.ai/reference/open-api/14-/350/256/276/345/244/207-/350/256/276/345/244/207/346/226/271/345/220/221.md +70 -0
- package/dist/template-starter/.ai/reference/open-api/15-/350/256/276/345/244/207-/351/231/200/350/236/272/344/273/252.md +104 -0
- package/dist/template-starter/.ai/reference/open-api/16-ui-/350/276/223/345/205/245.md +65 -0
- package/dist/template-starter/.ai/reference/open-api/17-/350/256/276/345/244/207-/347/275/221/347/273/234.md +164 -0
- package/dist/template-starter/.ai/reference/open-api/18-/350/256/276/345/244/207-/347/237/255/344/277/241.md +62 -0
- package/dist/template-starter/.ai/reference/open-api/19-/350/256/276/345/244/207-/346/227/240/351/232/234/347/242/215.md +43 -0
- package/dist/template-starter/.ai/reference/open-api/20-/350/256/276/345/244/207-/347/224/265/346/261/240.md +83 -0
- package/dist/template-starter/.ai/reference/open-api/21-/350/256/276/345/244/207-/346/227/245/345/216/206.md +215 -0
- package/dist/template-starter/.ai/reference/open-api/22-/350/256/276/345/244/207-/345/211/252/350/264/264/346/235/277.md +70 -0
- package/dist/template-starter/.ai/reference/open-api/23-/350/256/276/345/244/207-/350/201/224/347/263/273/344/272/272.md +270 -0
- package/dist/template-starter/.ai/reference/open-api/24-/350/256/276/345/244/207-/345/212/240/345/257/206.md +56 -0
- package/dist/template-starter/.ai/reference/open-api/25-/350/256/276/345/244/207-/347/224/265/350/257/235.md +41 -0
- package/dist/template-starter/.ai/reference/open-api/26-/350/256/276/345/244/207-/346/211/253/347/240/201.md +100 -0
- package/dist/template-starter/.ai/reference/open-api/27-/350/256/276/345/244/207-/345/261/217/345/271/225.md +173 -0
- package/dist/template-starter/.ai/reference/open-api/28-/350/256/276/345/244/207-/351/234/207/345/212/250.md +66 -0
- package/dist/template-starter/.ai/reference/open-api/README.md +27 -11
- package/dist/template-starter/.ai/reference/open-api.md +275 -8
- package/dist/template-starter/.ai/rules/dos-and-donts.md +50 -37
- package/dist/template-starter/AGENTS.md +54 -31
- package/dist/template-starter/README.md +6 -1
- package/dist/template-starter/package.json +2 -2
- package/dist/template-starter/src/app.config.ts +35 -0
- package/dist/template-starter/src/app.ts +0 -6
- package/dist/template-starter/src/pages/applet/index.tsx +0 -5
- package/dist/template-starter/src/pages/home/index.tsx +0 -5
- package/dist/template-starter/src/pages/lynx/index.tsx +0 -4
- package/dist/template-starter/src/pages/react-lynx/index.tsx +0 -5
- package/dist/template-starter/src/widgets/weather-card/index.tsx +0 -4
- package/dist/template-starter/tsconfig.json +2 -0
- package/package.json +1 -1
- package/dist/template-empty/.ai/reference/open-api/05-ui-/350/276/223/345/205/245.md +0 -95
- package/dist/template-empty/.ai/reference/open-api/06-network.md +0 -298
- package/dist/template-empty/.ai/reference/open-api/11-device-/344/274/240/346/204/237/345/231/250.md +0 -372
- package/dist/template-empty/.ai/reference/open-api/12-device-/346/234/254/345/234/260/350/203/275/345/212/233.md +0 -1005
- package/dist/template-starter/.ai/reference/open-api/05-ui-/350/276/223/345/205/245.md +0 -95
- package/dist/template-starter/.ai/reference/open-api/06-network.md +0 -298
- package/dist/template-starter/.ai/reference/open-api/11-device-/344/274/240/346/204/237/345/231/250.md +0 -372
- package/dist/template-starter/.ai/reference/open-api/12-device-/346/234/254/345/234/260/350/203/275/345/212/233.md +0 -1005
package/dist/template-empty/.ai/reference/open-api/11-device-/344/274/240/346/204/237/345/231/250.md
DELETED
|
@@ -1,372 +0,0 @@
|
|
|
1
|
-
# Open API: Device / 传感器
|
|
2
|
-
|
|
3
|
-
加速度、罗盘、陀螺仪、设备方向和 iBeacon。
|
|
4
|
-
|
|
5
|
-
[返回目录](./README.md) | [返回速查](../open-api.md)
|
|
6
|
-
|
|
7
|
-
## 速查
|
|
8
|
-
|
|
9
|
-
| API | 签名 | 用途 | 参数类型 | 结果类型 | 注意点 |
|
|
10
|
-
| --- | --- | --- | --- | --- | --- |
|
|
11
|
-
| [`startAccelerometer`](#startaccelerometer) | `startAccelerometer(params?): Promise<object>` | 开始监听加速度 | `params?: StartAccelerometerParams` | `Promise<object>` | 需配对调用 stopAccelerometer |
|
|
12
|
-
| [`stopAccelerometer`](#stopaccelerometer) | `stopAccelerometer(params?): Promise<object>` | 停止监听加速度 | `params?` | `Promise<object>` | - |
|
|
13
|
-
| [`startBeaconDiscovery`](#startbeacondiscovery) | `startBeaconDiscovery(params): Promise<object>` | 开始搜索附近的 iBeacon | `params: StartBeaconDiscoveryParams` | `Promise<object>` | 需配对调用 stopBeaconDiscovery |
|
|
14
|
-
| [`stopBeaconDiscovery`](#stopbeacondiscovery) | `stopBeaconDiscovery(params?): Promise<object>` | 停止搜索附近的 iBeacon | `params?` | `Promise<object>` | - |
|
|
15
|
-
| [`getBeacons`](#getbeacons) | `getBeacons(params?): Promise<GetBeaconsResult>` | 获取已搜索到的 iBeacon 列表 | `params?` | `Promise<GetBeaconsResult>` | - |
|
|
16
|
-
| [`startCompass`](#startcompass) | `startCompass(params?): Promise<object>` | 开始监听罗盘 | `params?` | `Promise<object>` | 需配对调用 stopCompass |
|
|
17
|
-
| [`stopCompass`](#stopcompass) | `stopCompass(params?): Promise<object>` | 停止监听罗盘 | `params?` | `Promise<object>` | - |
|
|
18
|
-
| [`onCompassChange`](#oncompasschange) | `onCompassChange(handler): () => void` | 监听罗盘数据变化事件 | `handler` | `() => void` | 返回取消监听函数 |
|
|
19
|
-
| [`startDeviceMotionListening`](#startdevicemotionlistening) | `startDeviceMotionListening(params?): Promise<object>` | 开始监听设备方向变化 | `params?: StartDeviceMotionListeningParams` | `Promise<object>` | 需配对调用 stopDeviceMotionListening |
|
|
20
|
-
| [`stopDeviceMotionListening`](#stopdevicemotionlistening) | `stopDeviceMotionListening(params?): Promise<object>` | 停止监听设备方向变化 | `params?` | `Promise<object>` | - |
|
|
21
|
-
| [`startGyroscope`](#startgyroscope) | `startGyroscope(params?): Promise<object>` | 开始监听陀螺仪 | `params?: StartGyroscopeParams` | `Promise<object>` | 需配对调用 stopGyroscope |
|
|
22
|
-
| [`stopGyroscope`](#stopgyroscope) | `stopGyroscope(params?): Promise<object>` | 停止监听陀螺仪 | `params?` | `Promise<object>` | - |
|
|
23
|
-
|
|
24
|
-
## API 详情
|
|
25
|
-
|
|
26
|
-
<a id="startaccelerometer"></a>
|
|
27
|
-
### startAccelerometer()
|
|
28
|
-
|
|
29
|
-
> **startAccelerometer**(`params`?): `Promise`\<`object`\>
|
|
30
|
-
|
|
31
|
-
开始监听加速度。
|
|
32
|
-
|
|
33
|
-
#### Parameters
|
|
34
|
-
|
|
35
|
-
• **params?**: [`StartAccelerometerParams`](#startaccelerometerparams)
|
|
36
|
-
|
|
37
|
-
#### Returns
|
|
38
|
-
|
|
39
|
-
`Promise`\<`object`\>
|
|
40
|
-
|
|
41
|
-
#### Remarks
|
|
42
|
-
|
|
43
|
-
需配对调用 stopAccelerometer。
|
|
44
|
-
|
|
45
|
-
<a id="stopaccelerometer"></a>
|
|
46
|
-
### stopAccelerometer()
|
|
47
|
-
|
|
48
|
-
> **stopAccelerometer**(`params`?): `Promise`\<`object`\>
|
|
49
|
-
|
|
50
|
-
停止监听加速度。
|
|
51
|
-
|
|
52
|
-
#### Parameters
|
|
53
|
-
|
|
54
|
-
• **params?**
|
|
55
|
-
|
|
56
|
-
#### Returns
|
|
57
|
-
|
|
58
|
-
`Promise`\<`object`\>
|
|
59
|
-
|
|
60
|
-
<a id="startbeacondiscovery"></a>
|
|
61
|
-
### startBeaconDiscovery()
|
|
62
|
-
|
|
63
|
-
> **startBeaconDiscovery**(`params`): `Promise`\<`object`\>
|
|
64
|
-
|
|
65
|
-
开始搜索附近的 iBeacon。
|
|
66
|
-
|
|
67
|
-
#### Parameters
|
|
68
|
-
|
|
69
|
-
• **params**: [`StartBeaconDiscoveryParams`](#startbeacondiscoveryparams)
|
|
70
|
-
|
|
71
|
-
#### Returns
|
|
72
|
-
|
|
73
|
-
`Promise`\<`object`\>
|
|
74
|
-
|
|
75
|
-
#### Remarks
|
|
76
|
-
|
|
77
|
-
需配对调用 stopBeaconDiscovery。
|
|
78
|
-
|
|
79
|
-
<a id="stopbeacondiscovery"></a>
|
|
80
|
-
### stopBeaconDiscovery()
|
|
81
|
-
|
|
82
|
-
> **stopBeaconDiscovery**(`params`?): `Promise`\<`object`\>
|
|
83
|
-
|
|
84
|
-
停止搜索附近的 iBeacon。
|
|
85
|
-
|
|
86
|
-
#### Parameters
|
|
87
|
-
|
|
88
|
-
• **params?**
|
|
89
|
-
|
|
90
|
-
#### Returns
|
|
91
|
-
|
|
92
|
-
`Promise`\<`object`\>
|
|
93
|
-
|
|
94
|
-
<a id="getbeacons"></a>
|
|
95
|
-
### getBeacons()
|
|
96
|
-
|
|
97
|
-
> **getBeacons**(`params`?): `Promise`\<[`GetBeaconsResult`](#getbeaconsresult)\>
|
|
98
|
-
|
|
99
|
-
获取已搜索到的 iBeacon 列表。
|
|
100
|
-
|
|
101
|
-
#### Parameters
|
|
102
|
-
|
|
103
|
-
• **params?**
|
|
104
|
-
|
|
105
|
-
#### Returns
|
|
106
|
-
|
|
107
|
-
`Promise`\<[`GetBeaconsResult`](#getbeaconsresult)\>
|
|
108
|
-
|
|
109
|
-
<a id="startcompass"></a>
|
|
110
|
-
### startCompass()
|
|
111
|
-
|
|
112
|
-
> **startCompass**(`params`?): `Promise`\<`object`\>
|
|
113
|
-
|
|
114
|
-
开始监听罗盘。
|
|
115
|
-
|
|
116
|
-
#### Parameters
|
|
117
|
-
|
|
118
|
-
• **params?**
|
|
119
|
-
|
|
120
|
-
#### Returns
|
|
121
|
-
|
|
122
|
-
`Promise`\<`object`\>
|
|
123
|
-
|
|
124
|
-
#### Remarks
|
|
125
|
-
|
|
126
|
-
需配对调用 stopCompass。
|
|
127
|
-
|
|
128
|
-
<a id="stopcompass"></a>
|
|
129
|
-
### stopCompass()
|
|
130
|
-
|
|
131
|
-
> **stopCompass**(`params`?): `Promise`\<`object`\>
|
|
132
|
-
|
|
133
|
-
停止监听罗盘。
|
|
134
|
-
|
|
135
|
-
#### Parameters
|
|
136
|
-
|
|
137
|
-
• **params?**
|
|
138
|
-
|
|
139
|
-
#### Returns
|
|
140
|
-
|
|
141
|
-
`Promise`\<`object`\>
|
|
142
|
-
|
|
143
|
-
<a id="oncompasschange"></a>
|
|
144
|
-
### onCompassChange()
|
|
145
|
-
|
|
146
|
-
> **onCompassChange**(`handler`): () => `void`
|
|
147
|
-
|
|
148
|
-
监听罗盘数据变化事件。
|
|
149
|
-
|
|
150
|
-
#### Parameters
|
|
151
|
-
|
|
152
|
-
• **handler**
|
|
153
|
-
|
|
154
|
-
#### Returns
|
|
155
|
-
|
|
156
|
-
`Function`
|
|
157
|
-
|
|
158
|
-
返回取消当前监听函数的函数。
|
|
159
|
-
|
|
160
|
-
##### Returns
|
|
161
|
-
|
|
162
|
-
`void`
|
|
163
|
-
|
|
164
|
-
#### Example
|
|
165
|
-
|
|
166
|
-
```ts
|
|
167
|
-
import { onCompassChange } from '@doubao-apps/framework/api';
|
|
168
|
-
|
|
169
|
-
const off = onCompassChange(({ direction }) => {
|
|
170
|
-
console.log(direction);
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
off();
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
<a id="startdevicemotionlistening"></a>
|
|
177
|
-
### startDeviceMotionListening()
|
|
178
|
-
|
|
179
|
-
> **startDeviceMotionListening**(`params`?): `Promise`\<`object`\>
|
|
180
|
-
|
|
181
|
-
开始监听设备方向变化。
|
|
182
|
-
|
|
183
|
-
#### Parameters
|
|
184
|
-
|
|
185
|
-
• **params?**: [`StartDeviceMotionListeningParams`](#startdevicemotionlisteningparams)
|
|
186
|
-
|
|
187
|
-
#### Returns
|
|
188
|
-
|
|
189
|
-
`Promise`\<`object`\>
|
|
190
|
-
|
|
191
|
-
#### Remarks
|
|
192
|
-
|
|
193
|
-
需配对调用 stopDeviceMotionListening。
|
|
194
|
-
|
|
195
|
-
<a id="stopdevicemotionlistening"></a>
|
|
196
|
-
### stopDeviceMotionListening()
|
|
197
|
-
|
|
198
|
-
> **stopDeviceMotionListening**(`params`?): `Promise`\<`object`\>
|
|
199
|
-
|
|
200
|
-
停止监听设备方向变化。
|
|
201
|
-
|
|
202
|
-
#### Parameters
|
|
203
|
-
|
|
204
|
-
• **params?**
|
|
205
|
-
|
|
206
|
-
#### Returns
|
|
207
|
-
|
|
208
|
-
`Promise`\<`object`\>
|
|
209
|
-
|
|
210
|
-
<a id="startgyroscope"></a>
|
|
211
|
-
### startGyroscope()
|
|
212
|
-
|
|
213
|
-
> **startGyroscope**(`params`?): `Promise`\<`object`\>
|
|
214
|
-
|
|
215
|
-
开始监听陀螺仪。
|
|
216
|
-
|
|
217
|
-
#### Parameters
|
|
218
|
-
|
|
219
|
-
• **params?**: [`StartGyroscopeParams`](#startgyroscopeparams)
|
|
220
|
-
|
|
221
|
-
#### Returns
|
|
222
|
-
|
|
223
|
-
`Promise`\<`object`\>
|
|
224
|
-
|
|
225
|
-
#### Remarks
|
|
226
|
-
|
|
227
|
-
需配对调用 stopGyroscope。
|
|
228
|
-
|
|
229
|
-
<a id="stopgyroscope"></a>
|
|
230
|
-
### stopGyroscope()
|
|
231
|
-
|
|
232
|
-
> **stopGyroscope**(`params`?): `Promise`\<`object`\>
|
|
233
|
-
|
|
234
|
-
停止监听陀螺仪。
|
|
235
|
-
|
|
236
|
-
#### Parameters
|
|
237
|
-
|
|
238
|
-
• **params?**
|
|
239
|
-
|
|
240
|
-
#### Returns
|
|
241
|
-
|
|
242
|
-
`Promise`\<`object`\>
|
|
243
|
-
|
|
244
|
-
## 相关类型
|
|
245
|
-
|
|
246
|
-
<a id="startaccelerometerparams"></a>
|
|
247
|
-
### StartAccelerometerParams
|
|
248
|
-
|
|
249
|
-
开始监听加速度的请求参数。
|
|
250
|
-
|
|
251
|
-
#### Properties
|
|
252
|
-
|
|
253
|
-
##### interval?
|
|
254
|
-
|
|
255
|
-
> `optional` **interval**: [`SensorInterval`](#sensorinterval)
|
|
256
|
-
|
|
257
|
-
监听频率。
|
|
258
|
-
|
|
259
|
-
<a id="sensorinterval"></a>
|
|
260
|
-
### SensorInterval
|
|
261
|
-
|
|
262
|
-
> **SensorInterval**: `"game"` \| `"ui"` \| `"normal"`
|
|
263
|
-
|
|
264
|
-
传感器监听频率。
|
|
265
|
-
|
|
266
|
-
<a id="startbeacondiscoveryparams"></a>
|
|
267
|
-
### StartBeaconDiscoveryParams
|
|
268
|
-
|
|
269
|
-
开始搜索 iBeacon 的请求参数。
|
|
270
|
-
|
|
271
|
-
#### Properties
|
|
272
|
-
|
|
273
|
-
##### ignoreBluetoothAvailable?
|
|
274
|
-
|
|
275
|
-
> `optional` **ignoreBluetoothAvailable**: `boolean`
|
|
276
|
-
|
|
277
|
-
iOS 下是否忽略蓝牙可用性校验。
|
|
278
|
-
|
|
279
|
-
##### uuids
|
|
280
|
-
|
|
281
|
-
> **uuids**: `string`[]
|
|
282
|
-
|
|
283
|
-
要搜索的 iBeacon UUID 列表。
|
|
284
|
-
|
|
285
|
-
<a id="getbeaconsresult"></a>
|
|
286
|
-
### GetBeaconsResult
|
|
287
|
-
|
|
288
|
-
获取 iBeacon 列表的返回结果。
|
|
289
|
-
|
|
290
|
-
#### Properties
|
|
291
|
-
|
|
292
|
-
##### beacons
|
|
293
|
-
|
|
294
|
-
> **beacons**: [`BeaconInfo`](#beaconinfo)[]
|
|
295
|
-
|
|
296
|
-
当前搜到的 iBeacon 列表。
|
|
297
|
-
|
|
298
|
-
<a id="beaconinfo"></a>
|
|
299
|
-
### BeaconInfo
|
|
300
|
-
|
|
301
|
-
iBeacon 设备信息。
|
|
302
|
-
|
|
303
|
-
#### Properties
|
|
304
|
-
|
|
305
|
-
##### accuracy
|
|
306
|
-
|
|
307
|
-
> **accuracy**: `number`
|
|
308
|
-
|
|
309
|
-
距离,单位米。
|
|
310
|
-
|
|
311
|
-
##### major
|
|
312
|
-
|
|
313
|
-
> **major**: `string`
|
|
314
|
-
|
|
315
|
-
主 ID。
|
|
316
|
-
|
|
317
|
-
##### minor
|
|
318
|
-
|
|
319
|
-
> **minor**: `string`
|
|
320
|
-
|
|
321
|
-
次 ID。
|
|
322
|
-
|
|
323
|
-
##### proximity
|
|
324
|
-
|
|
325
|
-
> **proximity**: [`BeaconProximity`](#beaconproximity)
|
|
326
|
-
|
|
327
|
-
距离等级。
|
|
328
|
-
|
|
329
|
-
##### rssi
|
|
330
|
-
|
|
331
|
-
> **rssi**: `number`
|
|
332
|
-
|
|
333
|
-
RSSI 信号强度,单位 dBm。
|
|
334
|
-
|
|
335
|
-
##### uuid
|
|
336
|
-
|
|
337
|
-
> **uuid**: `string`
|
|
338
|
-
|
|
339
|
-
Beacon UUID。
|
|
340
|
-
|
|
341
|
-
<a id="beaconproximity"></a>
|
|
342
|
-
### BeaconProximity
|
|
343
|
-
|
|
344
|
-
> **BeaconProximity**: `0` \| `1` \| `2` \| `3`
|
|
345
|
-
|
|
346
|
-
iBeacon 距离等级。
|
|
347
|
-
|
|
348
|
-
<a id="startdevicemotionlisteningparams"></a>
|
|
349
|
-
### StartDeviceMotionListeningParams
|
|
350
|
-
|
|
351
|
-
开始监听设备方向变化的请求参数。
|
|
352
|
-
|
|
353
|
-
#### Properties
|
|
354
|
-
|
|
355
|
-
##### interval?
|
|
356
|
-
|
|
357
|
-
> `optional` **interval**: [`SensorInterval`](#sensorinterval)
|
|
358
|
-
|
|
359
|
-
监听频率。
|
|
360
|
-
|
|
361
|
-
<a id="startgyroscopeparams"></a>
|
|
362
|
-
### StartGyroscopeParams
|
|
363
|
-
|
|
364
|
-
开始监听陀螺仪的请求参数。
|
|
365
|
-
|
|
366
|
-
#### Properties
|
|
367
|
-
|
|
368
|
-
##### interval?
|
|
369
|
-
|
|
370
|
-
> `optional` **interval**: [`SensorInterval`](#sensorinterval)
|
|
371
|
-
|
|
372
|
-
监听频率。
|