@urovotest/urovosdk-docs-mcp 1.0.1

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.
Files changed (42) hide show
  1. package/README.md +176 -0
  2. package/docs/00-overview.md +37 -0
  3. package/docs/01-integration/android-permissions.md +22 -0
  4. package/docs/01-integration/quickstart-zh.md +54 -0
  5. package/docs/02-reference/emv/emv-api.md +3308 -0
  6. package/docs/02-reference/emv/emv-appendix.md +112 -0
  7. package/docs/02-reference/emv/emv-callback.md +1155 -0
  8. package/docs/02-reference/emv/emv-enum.md +324 -0
  9. package/docs/02-reference/error-codes.md +59 -0
  10. package/docs/02-reference/general/beeper.md +160 -0
  11. package/docs/02-reference/general/devicemanager.md +460 -0
  12. package/docs/02-reference/general/insertcardreader.md +307 -0
  13. package/docs/02-reference/general/install-manager.md +202 -0
  14. package/docs/02-reference/general/led-light.md +144 -0
  15. package/docs/02-reference/general/magcardreader.md +191 -0
  16. package/docs/02-reference/general/pinpad.md +3309 -0
  17. package/docs/02-reference/general/printer.md +1410 -0
  18. package/docs/02-reference/general/psam2.md +55 -0
  19. package/docs/02-reference/general/rfcardreader.md +1090 -0
  20. package/docs/02-reference/general/scanner-custom.md +196 -0
  21. package/docs/02-reference/general/scanner.md +214 -0
  22. package/docs/02-reference/general/sdk-log-output-management.md +124 -0
  23. package/docs/02-reference/general/serial-port-deprecated-suggest-using-module-14-serialtool.md +406 -0
  24. package/docs/02-reference/general/serial-port.md +326 -0
  25. package/docs/02-reference/general/sle4428-4436-4442.md +1890 -0
  26. package/docs/02-reference/general/system-manager.md +212 -0
  27. package/docs/02-reference/module-index.md +30 -0
  28. package/docs/02-reference/source-emv_sdk.md +3927 -0
  29. package/docs/02-reference/source-general_sdk.md +8978 -0
  30. package/docs/02-reference/undocumented/kiosk-lock-task.md +92 -0
  31. package/docs/03-demo/activity-map.md +27 -0
  32. package/docs/api-registry.json +4733 -0
  33. package/docs/search-index.json +2688 -0
  34. package/docs/source/emv_sdk.md +3927 -0
  35. package/docs/source/general_sdk.md +8978 -0
  36. package/docs/source/kiosk_lock_task.md +86 -0
  37. package/package.json +36 -0
  38. package/src/launch.js +22 -0
  39. package/src/lib/check-update.js +92 -0
  40. package/src/lib/create-mcp-server.js +90 -0
  41. package/src/lib/docs-tools.js +206 -0
  42. package/src/server.js +10 -0
@@ -0,0 +1,460 @@
1
+ ---
2
+ title: DeviceManager API
3
+ module: DeviceManager
4
+ domain: general
5
+ tags: ["general", "devicemanager", "devicemanager"]
6
+ ---
7
+ # DeviceManager
8
+
9
+ 共 **21** 个 API/条目,来源 `general_sdk.md`。
10
+
11
+ ## API 索引
12
+
13
+ | 方法 | 类路径 | Demo Activity |
14
+ |------|--------|---------------|
15
+ | [NTP Setting](#ntp-setting) | `-` | - |
16
+ | [Time Zone Setting1](#time-zone-setting1) | `-` | - |
17
+ | [System Time Setting](#system-time-setting) | `-` | - |
18
+ | [Set APN](#set-apn) | `-` | - |
19
+ | [Query APN Setting](#query-apn-setting) | `-` | - |
20
+ | [Device Shutdown/Reboot](#device-shutdown-reboot) | `-` | - |
21
+ | [Device Battery Info](#device-battery-info) | `-` | - |
22
+ | [Launcher Setting](#launcher-setting) | `-` | - |
23
+ | [Auto Running APP Setting](#auto-running-app-setting) | `-` | - |
24
+ | [Double Click To Wake Up Screen](#double-click-to-wake-up-screen) | `-` | - |
25
+ | [Get Keyboard State](#get-keyboard-state) | `-` | - |
26
+ | [Disable Keyboard Switching](#disable-keyboard-switching) | `-` | - |
27
+ | [Switch Keyboard State](#switch-keyboard-state) | `-` | - |
28
+ | [Update the Keyboard State in Status bar](#update-the-keyboard-state-in-status-bar) | `-` | - |
29
+ | [Switch Wi-Fi](#switch-wi-fi) | `-` | - |
30
+ | [Switch Bluetooth](#switch-bluetooth) | `-` | - |
31
+ | [Switch Airplane mode](#switch-airplane-mode) | `-` | - |
32
+ | [Forget All Wi-Fi](#forget-all-wi-fi) | `-` | - |
33
+ | [Check Network Status](#check-network-status) | `-` | - |
34
+ | [Set/Get GPS Accuracy](#set-get-gps-accuracy) | `-` | - |
35
+ | [Set physical button volume](#set-physical-button-volume) | `-` | - |
36
+
37
+ ## NTP Setting
38
+
39
+ - **源文档章节:** 13.1
40
+
41
+ - Source section: `13.1`
42
+
43
+
44
+
45
+ Purpose:
46
+ new DeviceManager().setSettingProperty("Global-ntp_server", "time.android.com");
47
+
48
+
49
+ Source details:
50
+ ```text
51
+ new DeviceManager().setSettingProperty("Global-ntp_server", "time.android.com");
52
+ new DeviceManager().getSettingProperty("Global-ntp_server");
53
+ ```
54
+
55
+ ## Time Zone Setting1
56
+
57
+ - **源文档章节:** 13.2
58
+
59
+ - Source section: `13.2`
60
+
61
+
62
+
63
+ Purpose:
64
+ 1. new DeviceManager().setSettingProperty("persist-persist.sys.timezone","GMT+02:00");
65
+
66
+
67
+ Source details:
68
+ ```text
69
+ 1. new DeviceManager().setSettingProperty("persist-persist.sys.timezone","GMT+02:00");
70
+ 2. new DeviceManager().setSettingProperty("persist-persist.sys.settimezone","America/Los_Angeles");
71
+ ```
72
+
73
+ ## System Time Setting
74
+
75
+ - **源文档章节:** 13.3
76
+
77
+ - Source section: `13.3`
78
+
79
+
80
+
81
+ Purpose:
82
+ long time =
83
+
84
+
85
+ Source details:
86
+ ```text
87
+ long time =
88
+ new SimpleDateFormat("yyyyMMddHHmmss").parse("20220101000000").getTime();
89
+ new DeviceManager().setCurrentTime(time);
90
+ ```
91
+
92
+ ## Set APN
93
+
94
+ - **源文档章节:** 13.4
95
+
96
+ - Source section: `13.4`
97
+
98
+
99
+
100
+ Purpose:
101
+ boolean ret = new DeviceManager().setAPN(name, APN, "", 0, "", "", "", "", mcc, mnc, "", 0, 0, "", "", 0, "", true);
102
+
103
+
104
+ Source details:
105
+ ```text
106
+ boolean ret = new DeviceManager().setAPN(name, APN, "", 0, "", "", "", "", mcc, mnc, "", 0, 0, "", "", 0, "", true);
107
+ ```
108
+
109
+ ## Query APN Setting
110
+
111
+ - **源文档章节:** 13.5
112
+
113
+ - Source section: `13.5`
114
+
115
+
116
+
117
+ Purpose:
118
+ new DeviceManager().queryAPN(String selection, String[] selectionArgs).
119
+
120
+
121
+ Source details:
122
+ ```text
123
+ new DeviceManager().queryAPN(String selection, String[] selectionArgs).
124
+ selection: this parameter is a key that you want to query,
125
+ the format seems like a sql command. eg:Telephony.Carriers.APN+" = ?".
126
+ Refer to the keys below:
127
+ Telephony.Carriers._ID,
128
+ Telephony.Carriers.NAME,
129
+ Telephony.Carriers.APN,
130
+ Telephony.Carriers.MCC,
131
+ Telephony.Carriers.MNC,
132
+ Telephony.Carriers.NUMERIC,
133
+ Telephony.Carriers.PROXY,
134
+ Telephony.Carriers.PORT,
135
+ Telephony.Carriers.MMSPROXY,
136
+ Telephony.Carriers.MMSPORT,
137
+ Telephony.Carriers.MMSC,
138
+ Telephony.Carriers.SERVER,
139
+ Telephony.Carriers.PASSWORD,
140
+ Telephony.Carriers.AUTH_TYPE,
141
+ Telephony.Carriers.TYPE,
142
+ Telephony.Carriers.USER,
143
+ Telephony.Carriers.CURRENT.
144
+ selectionArgs: this parameter is the value of the key what you want to query. eg:new String[]{"APN Test"}.
145
+ For example:queryAPN(Telephony.Carriers.NAME+" = ?", new String[]{"APN Test"});
146
+ ```
147
+
148
+ ## Device Shutdown/Reboot
149
+
150
+ - **源文档章节:** 13.4
151
+
152
+ - Source section: `13.4`
153
+
154
+
155
+
156
+ Purpose:
157
+ new DeviceManager().shutdown(boolean reboot); //true: reboot, false:shutdown.
158
+
159
+
160
+ Source details:
161
+ ```text
162
+ new DeviceManager().shutdown(boolean reboot); //true: reboot, false:shutdown.
163
+ ```
164
+
165
+ ## Device Battery Info
166
+
167
+ - **源文档章节:** 13.5
168
+
169
+ - Source section: `13.5`
170
+
171
+
172
+
173
+ Purpose:
174
+ Bundle bundle = new DeviceManager().getBatteryInfo();
175
+
176
+
177
+ Source details:
178
+ ```text
179
+ Bundle bundle = new DeviceManager().getBatteryInfo();
180
+ int level = bundle.getInt("level"); //battery percentage
181
+ int plugged = bundle.getInt("plugged"); //Is it charging, 0:no, 1:yes.
182
+ ```
183
+
184
+ ## Launcher Setting
185
+
186
+ - **源文档章节:** 13.6
187
+
188
+ - Source section: `13.6`
189
+
190
+
191
+
192
+ Purpose:
193
+ new DeviceManager().setDefaultLauncher(ComponentName.unflattenFromString(componetStr);
194
+
195
+
196
+ Source details:
197
+ ```text
198
+ new DeviceManager().setDefaultLauncher(ComponentName.unflattenFromString(componetStr);
199
+ //componentStr = "packageName/ActivityPath".
200
+ // eg: "com.urovo.demo/com.urovo.demo.MainActivity".
201
+ //<intent-filter>
202
+ <action android:name="android.intent.action.MAIN" />
203
+
204
+ <category android:name="android.intent.category.LAUNCHER" />
205
+
206
+ <category android:name="android.intent.category.HOME" />
207
+
208
+ <category android:name="android.intent.category.DEFAULT" />
209
+ </intent-filter>
210
+ ```
211
+
212
+ ## Auto Running APP Setting
213
+
214
+ - **源文档章节:** 13.7
215
+
216
+ - Source section: `13.7`
217
+
218
+
219
+
220
+ Purpose:
221
+ new DeviceManager().setAutoRunningApp(ComponentName.unflattenFromString(componetStr, action); //action:0:disable, 1:enable
222
+
223
+
224
+ Source details:
225
+ ```text
226
+ new DeviceManager().setAutoRunningApp(ComponentName.unflattenFromString(componetStr, action); //action:0:disable, 1:enable
227
+ //componentStr = "packageName/ActivityPath".
228
+ // eg: "com.urovo.demo/com.urovo.demo.MainActivity".
229
+ ```
230
+
231
+ ## Double Click To Wake Up Screen
232
+
233
+ - **源文档章节:** 13.8
234
+
235
+ - Source section: `13.8`
236
+
237
+
238
+
239
+ Purpose:
240
+ DeviceManager deviceManager = new DeviceManager();
241
+
242
+
243
+ Source details:
244
+ ```text
245
+ DeviceManager deviceManager = new DeviceManager();
246
+ enable:
247
+ deviceManager.setSettingProperty("persist-persist.sys.urv.tp.wakeup.gesture", "doubleclick");
248
+ disable:
249
+ deviceManager.setSettingProperty("persist-persist.sys.urv.tp.wakeup.gesture", "");
250
+ ```
251
+
252
+ ## Get Keyboard State
253
+
254
+ - **源文档章节:** 13.9
255
+
256
+ - Source section: `13.9`
257
+
258
+
259
+
260
+ Purpose:
261
+ //keyboard state: 0-NUM, 1-LOWER, 2-UPPER.
262
+
263
+
264
+ Source details:
265
+ ```text
266
+ //keyboard state: 0-NUM, 1-LOWER, 2-UPPER.
267
+ String state = new DeviceManager().getSettingProperty("Global-ufans.keyboard.state");
268
+ ```
269
+
270
+ ## Disable Keyboard Switching
271
+
272
+ - **源文档章节:** 13.10
273
+
274
+ - Source section: `13.10`
275
+
276
+
277
+
278
+ Purpose:
279
+ DeviceManager deviceManager = new DeviceManager();
280
+
281
+
282
+ Source details:
283
+ ```text
284
+ DeviceManager deviceManager = new DeviceManager();
285
+ //disable
286
+ deviceManager.setSettingProperty("persist-persist.sys.urv.disable.change_language", "true");
287
+ //enable
288
+ deviceManager.setSettingProperty("persist-persist.sys.urv.disable.change_language", "false");
289
+ ```
290
+
291
+ ## Switch Keyboard State
292
+
293
+ - **源文档章节:** 13.11
294
+
295
+ - Source section: `13.11`
296
+
297
+
298
+
299
+ Purpose:
300
+ //After keyboard switching, need to update the keyboard state in the status bar.
301
+
302
+
303
+ Source details:
304
+ ```text
305
+ //After keyboard switching, need to update the keyboard state in the status bar.
306
+ //keyboard mode: 0-NUM, 1-LOWER, 2-UPPER.
307
+ String MODE_KB = "0";
308
+ new DeviceManager.setSettingProperty("Global-ufans.keyboard.state", MODE_KB);
309
+ ```
310
+
311
+ ## Update the Keyboard State in Status bar
312
+
313
+ - **源文档章节:** 13.12
314
+
315
+ - Source section: `13.12`
316
+
317
+
318
+
319
+ Purpose:
320
+ sendBroadcast(new Intent("android.intent.action.ACTION_SWITCH_KEY_STATE"));
321
+
322
+
323
+ Source details:
324
+ ```text
325
+ sendBroadcast(new Intent("android.intent.action.ACTION_SWITCH_KEY_STATE"));
326
+ ```
327
+
328
+ ## Switch Wi-Fi
329
+
330
+ - **源文档章节:** 13.13
331
+
332
+ - Source section: `13.13`
333
+
334
+
335
+
336
+ Purpose:
337
+ new DeviceManager().switchWifi(boolean enable);
338
+
339
+
340
+ Source details:
341
+ ```text
342
+ new DeviceManager().switchWifi(boolean enable);
343
+ ```
344
+
345
+ ## Switch Bluetooth
346
+
347
+ - **源文档章节:** 13.14
348
+
349
+ - Source section: `13.14`
350
+
351
+
352
+
353
+ Purpose:
354
+ new DeviceManager().switchBT(boolean enable);
355
+
356
+
357
+ Source details:
358
+ ```text
359
+ new DeviceManager().switchBT(boolean enable);
360
+ ```
361
+
362
+ ## Switch Airplane mode
363
+
364
+ - **源文档章节:** 13.15
365
+
366
+ - Source section: `13.15`
367
+
368
+
369
+
370
+ Purpose:
371
+ new DeviceManager().setAirplaneMode(boolean enable);
372
+
373
+
374
+ Source details:
375
+ ```text
376
+ new DeviceManager().setAirplaneMode(boolean enable);
377
+ ```
378
+
379
+ ## Forget All Wi-Fi
380
+
381
+ - **源文档章节:** 13.16
382
+
383
+ - Source section: `13.16`
384
+
385
+
386
+
387
+ Purpose:
388
+ new DeviceManager().forgetAllWifi();
389
+
390
+
391
+ Source details:
392
+ ```text
393
+ new DeviceManager().forgetAllWifi();
394
+ ```
395
+
396
+ ## Check Network Status
397
+
398
+ - **源文档章节:** 13.17
399
+
400
+ - Source section: `13.17`
401
+
402
+
403
+
404
+ Purpose:
405
+ int status = new DeviceManager().checkNetworkStatus();
406
+
407
+
408
+ Source details:
409
+ ```text
410
+ int status = new DeviceManager().checkNetworkStatus();
411
+ //0:Normal network connection.
412
+ //1:SIM card not ready.
413
+ //2:Mobile network shutdown.
414
+ //3:Not registered on the network.
415
+ //4:APN configuration failed.
416
+ //5:No data connection.
417
+ //6:No Internet connection.
418
+ ```
419
+
420
+ ## Set/Get GPS Accuracy
421
+
422
+ - **源文档章节:** 13.18
423
+
424
+ - Source section: `13.18`
425
+
426
+
427
+
428
+ Purpose:
429
+ DeviceManager deviceManager = new DeviceManager();
430
+
431
+
432
+ Source details:
433
+ ```text
434
+ DeviceManager deviceManager = new DeviceManager();
435
+ boolean ret = deviceManager.setSettingProperty("Secure-location_mode", "3");
436
+ String value = deviceManager.getSettingProperty("Secure-location_mode");
437
+
438
+ boolean ret = deviceManager.setSettingProperty("ro.ufs.gps.high_accuracy", "true");
439
+ String value = deviceManager.getSettingProperty("ro.ufs.gps.high_accuracy");
440
+ ```
441
+
442
+ ## Set physical button volume
443
+
444
+ - **源文档章节:** 13.19
445
+
446
+ - Source section: `13.19`
447
+
448
+
449
+
450
+ Purpose:
451
+ //volume: 0-15
452
+
453
+
454
+ Source details:
455
+ ```text
456
+ //volume: 0-15
457
+ int volume = 0;
458
+ new DeviceManager().setSettingProperty("persist-persist.sys.urv.notification.volume",
459
+ "" + volume);
460
+ ```