@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,1090 @@
1
+ ---
2
+ title: RFCardReader API
3
+ module: RFCardReader
4
+ domain: general
5
+ tags: ["general", "rfcardreader", "rfcardreader"]
6
+ ---
7
+ # RFCardReader
8
+
9
+ 共 **17** 个 API/条目,来源 `general_sdk.md`。
10
+
11
+ ## API 索引
12
+
13
+ | 方法 | 类路径 | Demo Activity |
14
+ |------|--------|---------------|
15
+ | [searchCard](#searchcard) | `com.urovo.sdk.rfcard.RFCardHandlerImpl` | RFReaderActivity |
16
+ | [stopSearch](#stopsearch) | `com.urovo.sdk.rfcard.RFCardHandlerImpl` | RFReaderActivity |
17
+ | [activate](#activate) | `com.urovo.sdk.rfcard.RFCardHandlerImpl` | RFReaderActivity |
18
+ | [halt](#halt) | `com.urovo.sdk.rfcard.RFCardHandlerImpl` | RFReaderActivity |
19
+ | [isExist](#isexist) | `com.urovo.sdk.rfcard.RFCardHandlerImpl` | RFReaderActivity |
20
+ | [exchangeApdu](#exchangeapdu) | `com.urovo.sdk.rfcard.RFCardHandlerImpl` | RFReaderActivity |
21
+ | [cardReset](#cardreset) | `com.urovo.sdk.rfcard.RFCardHandlerImpl` | RFReaderActivity |
22
+ | [authBlock](#authblock) | `com.urovo.sdk.rfcard.RFCardHandlerImpl` | RFReaderActivity |
23
+ | [readBlock](#readblock) | `com.urovo.sdk.rfcard.RFCardHandlerImpl` | RFReaderActivity |
24
+ | [writeBlock](#writeblock) | `com.urovo.sdk.rfcard.RFCardHandlerImpl` | RFReaderActivity |
25
+ | [increaseValue](#increasevalue) | `com.urovo.sdk.rfcard.RFCardHandlerImpl` | RFReaderActivity |
26
+ | [decreaseValue](#decreasevalue) | `com.urovo.sdk.rfcard.RFCardHandlerImpl` | RFReaderActivity |
27
+ | [m1_amount _init](#m1-amount-init) | `com.urovo.sdk.rfcard.RFCardHandlerImpl` | RFReaderActivity |
28
+ | [m1_amount_read](#m1-amount-read) | `com.urovo.sdk.rfcard.RFCardHandlerImpl` | RFReaderActivity |
29
+ | [m1_amount_restore](#m1-amount-restore) | `com.urovo.sdk.rfcard.RFCardHandlerImpl` | RFReaderActivity |
30
+ | [m1_amount_transfer](#m1-amount-transfer) | `com.urovo.sdk.rfcard.RFCardHandlerImpl` | RFReaderActivity |
31
+ | [exchangeApdu(Mifare)](#exchangeapdu-mifare) | `com.urovo.sdk.rfcard.RFCardHandlerImpl` | RFReaderActivity |
32
+
33
+ ## searchCard
34
+
35
+ Card search.
36
+
37
+ ```java
38
+ void searchCard(RFSearchListener listener)
39
+ ```
40
+
41
+ - **类路径:** `com.urovo.sdk.rfcard.RFCardHandlerImpl`
42
+ - **Demo Activity(参考):** RFReaderActivity
43
+ - **源文档章节:** 10.1
44
+
45
+ - Source section: `10.1`
46
+
47
+ - Package/class path: `com.urovo.sdk.rfcard.RFCardHandlerImpl`
48
+
49
+ - Demo reference: `UrovoPosSdkDemo/app/src/main/java/com/urovo/sdk/view/RFReaderActivity.java`
50
+
51
+
52
+
53
+ Purpose:
54
+ Card search.
55
+
56
+
57
+ Signature/prototype:
58
+ ```java
59
+ void searchCard(RFSearchListener listener)
60
+ ```
61
+
62
+
63
+ Parameters:
64
+ Input
65
+ listener - searching card listener.
66
+ Output
67
+ None
68
+
69
+
70
+ Return value:
71
+ None.
72
+
73
+
74
+ Usage notes:
75
+ /**
76
+ * Searching card process listener interface definition
77
+ */
78
+ interface RFSearchListener {
79
+ /**
80
+ * card search successful
81
+ * @param cardType - card type.
82
+ Refer to com.urovo.sdk.rfcard.utils.Constant.CardType.
83
+ *
84
+ * - S50_CARD(0x00) - S50
85
+ * - S70_CARD(0x01) - S70
86
+ * - PRO_CARD(0x02) - PRO
87
+ * - S50_PRO_CARD(0x03) -Pro card supporting S50 driver and pro driver
88
+ * - S70_PRO_CARD(0x04) -Pro card supporting S70 driver and pro driver
89
+ * - CPU_CARD(0x05) - CPU card
90
+ *
91
+ * @param uid- card uid
92
+ * @param uid- CardInfo: MODE, SAK, ATQA, UID.
93
+
94
+ */
95
+ void onCardPass(int cardType, byte[] uid, CardInfo cardInfo);
96
+ /**
97
+ * card searcher failed
98
+ * @param error - error code
99
+ *
100
+ * - ERROR_TRANSERR(0xA2) -Communication failure
101
+ * - ERROR_PROTERR(0xA3) - The data returned from the card does not meet the specification requirements
102
+ * - ERROR_MULTIERR(0xA4) - There are many cards in the sensing area
103
+ * - ERROR_CARDTIMEOUT(0xA7) - No response after timeout
104
+ * - ERROR_CARDNOACT(0xB3) - Pro Card or TypeB card not activated
105
+ * - ERROR_MCSERVICE_CRASH(0xff01) - Master service exception
106
+ * - ERROR_REQUEST_EXCEPTION(0xff02) - Request exception
107
+ *
108
+ * @param message - error description */
109
+ void onFail(int error, String message);
110
+ }
111
+
112
+
113
+ Simplified example:
114
+ ```java
115
+ RFCardReaderImpl.getInstance().searchCard(30, listener);
116
+ ```
117
+
118
+
119
+ Source details:
120
+ ```text
121
+ Prototype
122
+ void searchCard(RFSearchListener listener)
123
+ Description
124
+ Card search.
125
+ Parameters
126
+ Input
127
+ listener - searching card listener.
128
+ Output
129
+ None
130
+ Return
131
+ None.
132
+ Remark
133
+ /**
134
+ * Searching card process listener interface definition
135
+ */
136
+ interface RFSearchListener {
137
+ /**
138
+ * card search successful
139
+ * @param cardType - card type.
140
+ Refer to com.urovo.sdk.rfcard.utils.Constant.CardType.
141
+ *
142
+ * - S50_CARD(0x00) - S50
143
+ * - S70_CARD(0x01) - S70
144
+ * - PRO_CARD(0x02) - PRO
145
+ * - S50_PRO_CARD(0x03) -Pro card supporting S50 driver and pro driver
146
+ * - S70_PRO_CARD(0x04) -Pro card supporting S70 driver and pro driver
147
+ * - CPU_CARD(0x05) - CPU card
148
+ *
149
+ * @param uid- card uid
150
+ * @param uid- CardInfo: MODE, SAK, ATQA, UID.
151
+
152
+ */
153
+ void onCardPass(int cardType, byte[] uid, CardInfo cardInfo);
154
+ /**
155
+ * card searcher failed
156
+ * @param error - error code
157
+ *
158
+ * - ERROR_TRANSERR(0xA2) -Communication failure
159
+ * - ERROR_PROTERR(0xA3) - The data returned from the card does not meet the specification requirements
160
+ * - ERROR_MULTIERR(0xA4) - There are many cards in the sensing area
161
+ * - ERROR_CARDTIMEOUT(0xA7) - No response after timeout
162
+ * - ERROR_CARDNOACT(0xB3) - Pro Card or TypeB card not activated
163
+ * - ERROR_MCSERVICE_CRASH(0xff01) - Master service exception
164
+ * - ERROR_REQUEST_EXCEPTION(0xff02) - Request exception
165
+ *
166
+ * @param message - error description */
167
+ void onFail(int error, String message);
168
+ }
169
+ ```
170
+
171
+ ## stopSearch
172
+
173
+ stop searching card.
174
+
175
+ ```java
176
+ void stopSearch()
177
+ ```
178
+
179
+ - **类路径:** `com.urovo.sdk.rfcard.RFCardHandlerImpl`
180
+ - **Demo Activity(参考):** RFReaderActivity
181
+ - **源文档章节:** 10.2
182
+
183
+ - Source section: `10.2`
184
+
185
+ - Package/class path: `com.urovo.sdk.rfcard.RFCardHandlerImpl`
186
+
187
+ - Demo reference: `UrovoPosSdkDemo/app/src/main/java/com/urovo/sdk/view/RFReaderActivity.java`
188
+
189
+
190
+
191
+ Purpose:
192
+ stop searching card.
193
+
194
+
195
+ Signature/prototype:
196
+ ```java
197
+ void stopSearch()
198
+ ```
199
+
200
+
201
+ Parameters:
202
+ Input
203
+ None
204
+ Output
205
+ None
206
+
207
+
208
+ Return value:
209
+ None
210
+
211
+
212
+ Source details:
213
+ ```text
214
+ Prototype
215
+ void stopSearch()
216
+ Description
217
+ stop searching card.
218
+ Parameters
219
+ Input
220
+ None
221
+ Output
222
+ None
223
+ Return
224
+ None
225
+ Remark
226
+ ```
227
+
228
+ ## activate
229
+
230
+ activate card.
231
+
232
+ ```java
233
+ int activate(String driver, byte[] responseData)
234
+ ```
235
+
236
+ - **类路径:** `com.urovo.sdk.rfcard.RFCardHandlerImpl`
237
+ - **Demo Activity(参考):** RFReaderActivity
238
+ - **源文档章节:** 10.3
239
+
240
+ - Source section: `10.3`
241
+
242
+ - Package/class path: `com.urovo.sdk.rfcard.RFCardHandlerImpl`
243
+
244
+ - Demo reference: `UrovoPosSdkDemo/app/src/main/java/com/urovo/sdk/view/RFReaderActivity.java`
245
+
246
+
247
+
248
+ Purpose:
249
+ activate card.
250
+
251
+
252
+ Signature/prototype:
253
+ ```java
254
+ int activate(String driver, byte[] responseData)
255
+ ```
256
+
257
+
258
+ Parameters:
259
+ Input
260
+ driver:
261
+ *
262
+ * - "S50" - S50 card
263
+ * - "S70" - S70 card
264
+ * - "CPU" - CPU card
265
+ * - "PRO" - PRO、S5O_PRO、S70_PRO card
266
+ *
267
+ Output
268
+ responseData - activate card response data
269
+
270
+
271
+ Return value:
272
+ The length of activate response, negative number if failed.
273
+
274
+
275
+ Source details:
276
+ ```text
277
+ Prototype
278
+ int activate(String driver, byte[] responseData)
279
+ Description
280
+ activate card.
281
+ Parameters
282
+ Input
283
+ driver:
284
+ *
285
+ * - "S50" - S50 card
286
+ * - "S70" - S70 card
287
+ * - "CPU" - CPU card
288
+ * - "PRO" - PRO、S5O_PRO、S70_PRO card
289
+ *
290
+ Output
291
+ responseData - activate card response data
292
+ Return
293
+ The length of activate response, negative number if failed.
294
+ Remark
295
+ ```
296
+
297
+ ## halt
298
+
299
+ Close the card reader.
300
+
301
+ ```java
302
+ void halt()
303
+ ```
304
+
305
+ - **类路径:** `com.urovo.sdk.rfcard.RFCardHandlerImpl`
306
+ - **Demo Activity(参考):** RFReaderActivity
307
+ - **源文档章节:** 10.4
308
+
309
+ - Source section: `10.4`
310
+
311
+ - Package/class path: `com.urovo.sdk.rfcard.RFCardHandlerImpl`
312
+
313
+ - Demo reference: `UrovoPosSdkDemo/app/src/main/java/com/urovo/sdk/view/RFReaderActivity.java`
314
+
315
+
316
+
317
+ Purpose:
318
+ Close the card reader.
319
+
320
+
321
+ Signature/prototype:
322
+ ```java
323
+ void halt()
324
+ ```
325
+
326
+
327
+ Parameters:
328
+ Input
329
+ None
330
+ Output
331
+ None
332
+
333
+
334
+ Return value:
335
+ None
336
+
337
+
338
+ Source details:
339
+ ```text
340
+ Prototype
341
+ void halt()
342
+ Description
343
+ Close the card reader.
344
+ Parameters
345
+ Input
346
+ None
347
+ Output
348
+ None
349
+ Return
350
+ None
351
+ Remark
352
+ ```
353
+
354
+ ## isExist
355
+
356
+ Check if the card exist.
357
+
358
+ ```java
359
+ boolean isCardIn()
360
+ ```
361
+
362
+ - **类路径:** `com.urovo.sdk.rfcard.RFCardHandlerImpl`
363
+ - **Demo Activity(参考):** RFReaderActivity
364
+ - **源文档章节:** 10.5
365
+
366
+ - Source section: `10.5`
367
+
368
+ - Package/class path: `com.urovo.sdk.rfcard.RFCardHandlerImpl`
369
+
370
+ - Demo reference: `UrovoPosSdkDemo/app/src/main/java/com/urovo/sdk/view/RFReaderActivity.java`
371
+
372
+
373
+
374
+ Purpose:
375
+ Check if the card exist.
376
+
377
+
378
+ Signature/prototype:
379
+ ```java
380
+ boolean isCardIn()
381
+ ```
382
+
383
+
384
+ Parameters:
385
+ Input
386
+ None
387
+ Output
388
+ None
389
+
390
+
391
+ Return value:
392
+ Return true when card exist, return false when card does not exist.
393
+
394
+
395
+ Source details:
396
+ ```text
397
+ Prototype
398
+ boolean isCardIn()
399
+ Description
400
+ Check if the card exist.
401
+ Parameters
402
+ Input
403
+ None
404
+ Output
405
+ None
406
+ Return
407
+ Return true when card exist, return false when card does not exist.
408
+ Remark
409
+ ```
410
+
411
+ ## exchangeApdu
412
+
413
+ APDU data communication.
414
+
415
+ ```java
416
+ byte[] exchangeApdu(byte[] apdu)
417
+ ```
418
+
419
+ - **类路径:** `com.urovo.sdk.rfcard.RFCardHandlerImpl`
420
+ - **Demo Activity(参考):** RFReaderActivity
421
+ - **源文档章节:** 10.6
422
+
423
+ - Source section: `10.6`
424
+
425
+ - Package/class path: `com.urovo.sdk.rfcard.RFCardHandlerImpl`
426
+
427
+ - Demo reference: `UrovoPosSdkDemo/app/src/main/java/com/urovo/sdk/view/RFReaderActivity.java`
428
+
429
+
430
+
431
+ Purpose:
432
+ APDU data communication.
433
+
434
+
435
+ Signature/prototype:
436
+ ```java
437
+ byte[] exchangeApdu(byte[] apdu)
438
+ ```
439
+
440
+
441
+ Parameters:
442
+ Input
443
+ apdu - apdu data.
444
+ Output
445
+ None
446
+
447
+
448
+ Return value:
449
+ Return card response data when communication successful, return null when communication failed.
450
+
451
+
452
+ Source details:
453
+ ```text
454
+ Prototype
455
+ byte[] exchangeApdu(byte[] apdu)
456
+ Description
457
+ APDU data communication.
458
+ Parameters
459
+ Input
460
+ apdu - apdu data.
461
+ Output
462
+ None
463
+ Return
464
+ Return card response data when communication successful, return null when communication failed.
465
+ Remark
466
+ ```
467
+
468
+ ## cardReset
469
+
470
+ Card reset.
471
+
472
+ ```java
473
+ byte[] cardReset()
474
+ ```
475
+
476
+ - **类路径:** `com.urovo.sdk.rfcard.RFCardHandlerImpl`
477
+ - **Demo Activity(参考):** RFReaderActivity
478
+ - **源文档章节:** 10.7
479
+
480
+ - Source section: `10.7`
481
+
482
+ - Package/class path: `com.urovo.sdk.rfcard.RFCardHandlerImpl`
483
+
484
+ - Demo reference: `UrovoPosSdkDemo/app/src/main/java/com/urovo/sdk/view/RFReaderActivity.java`
485
+
486
+
487
+
488
+ Purpose:
489
+ Card reset.
490
+
491
+
492
+ Signature/prototype:
493
+ ```java
494
+ byte[] cardReset()
495
+ ```
496
+
497
+
498
+ Parameters:
499
+ Input
500
+ cardSlot -0:user card ,1:psam1,2:psam2.
501
+ resetType -reset type
502
+ Output
503
+ None
504
+
505
+
506
+ Return value:
507
+ Return card reset data when reset successful, return null when reset failed.
508
+
509
+
510
+ Source details:
511
+ ```text
512
+ Prototype
513
+ byte[] cardReset()
514
+ Description
515
+ Card reset.
516
+ Parameters
517
+ Input
518
+ cardSlot -0:user card ,1:psam1,2:psam2.
519
+ resetType -reset type
520
+ Output
521
+ None
522
+ Return
523
+ Return card reset data when reset successful, return null when reset failed.
524
+ Remark
525
+ ```
526
+
527
+ ## authBlock
528
+
529
+ Auth block.
530
+
531
+ ```java
532
+ int authBlock(int blockNo, int keyType, byte[] key)
533
+ ```
534
+
535
+ - **类路径:** `com.urovo.sdk.rfcard.RFCardHandlerImpl`
536
+ - **Demo Activity(参考):** RFReaderActivity
537
+ - **源文档章节:** 10.8
538
+
539
+ - Source section: `10.8`
540
+
541
+ - Package/class path: `com.urovo.sdk.rfcard.RFCardHandlerImpl`
542
+
543
+ - Demo reference: `UrovoPosSdkDemo/app/src/main/java/com/urovo/sdk/view/RFReaderActivity.java`
544
+
545
+
546
+
547
+ Purpose:
548
+ Auth block.
549
+
550
+
551
+ Signature/prototype:
552
+ ```java
553
+ int authBlock(int blockNo, int keyType, byte[] key)
554
+ ```
555
+
556
+
557
+ Parameters:
558
+ Input
559
+ blockNo - the block number,0 =<blockNo<=255
560
+ Refer to com.urovo.sdk.rfcard.utils.Constant.KeyType.
561
+ keyType - KEY_A:0, KEY_B:1.
562
+ key: the password.
563
+ Output
564
+ None
565
+
566
+
567
+ Return value:
568
+ 0:success, others:failed.
569
+
570
+
571
+ Source details:
572
+ ```text
573
+ Prototype
574
+ int authBlock(int blockNo, int keyType, byte[] key)
575
+ Description
576
+ Auth block.
577
+ Parameters
578
+ Input
579
+ blockNo - the block number,0 =<blockNo<=255
580
+ Refer to com.urovo.sdk.rfcard.utils.Constant.KeyType.
581
+ keyType - KEY_A:0, KEY_B:1.
582
+ key: the password.
583
+ Output
584
+ None
585
+ Return
586
+ 0:success, others:failed.
587
+ Remark
588
+ ```
589
+
590
+ ## readBlock
591
+
592
+ Read data from the block.
593
+
594
+ ```java
595
+ int readBlock(int blockNo, byte[] blockValue)
596
+ ```
597
+
598
+ - **类路径:** `com.urovo.sdk.rfcard.RFCardHandlerImpl`
599
+ - **Demo Activity(参考):** RFReaderActivity
600
+ - **源文档章节:** 10.9
601
+
602
+ - Source section: `10.9`
603
+
604
+ - Package/class path: `com.urovo.sdk.rfcard.RFCardHandlerImpl`
605
+
606
+ - Demo reference: `UrovoPosSdkDemo/app/src/main/java/com/urovo/sdk/view/RFReaderActivity.java`
607
+
608
+
609
+
610
+ Purpose:
611
+ Read data from the block.
612
+
613
+
614
+ Signature/prototype:
615
+ ```java
616
+ int readBlock(int blockNo, byte[] blockValue)
617
+ ```
618
+
619
+
620
+ Parameters:
621
+ Input
622
+ blockNo - the sector number,0= <blockNo<=255
623
+ Output
624
+ blockValue - the block value
625
+
626
+
627
+ Return value:
628
+ The length of block value, negative number if read failed.
629
+
630
+
631
+ Source details:
632
+ ```text
633
+ Prototype
634
+ int readBlock(int blockNo, byte[] blockValue)
635
+ Description
636
+ Read data from the block.
637
+ Parameters
638
+ Input
639
+ blockNo - the sector number,0= <blockNo<=255
640
+ Output
641
+ blockValue - the block value
642
+ Return
643
+ The length of block value, negative number if read failed.
644
+ Remark
645
+ ```
646
+
647
+ ## writeBlock
648
+
649
+ Write data to the block.
650
+
651
+ ```java
652
+ int writeBlock(int blockNo, byte[] blockValue)
653
+ ```
654
+
655
+ - **类路径:** `com.urovo.sdk.rfcard.RFCardHandlerImpl`
656
+ - **Demo Activity(参考):** RFReaderActivity
657
+ - **源文档章节:** 10.10
658
+
659
+ - Source section: `10.10`
660
+
661
+ - Package/class path: `com.urovo.sdk.rfcard.RFCardHandlerImpl`
662
+
663
+ - Demo reference: `UrovoPosSdkDemo/app/src/main/java/com/urovo/sdk/view/RFReaderActivity.java`
664
+
665
+
666
+
667
+ Purpose:
668
+ Write data to the block.
669
+
670
+
671
+ Signature/prototype:
672
+ ```java
673
+ int writeBlock(int blockNo, byte[] blockValue)
674
+ ```
675
+
676
+
677
+ Parameters:
678
+ Input
679
+ blockNo - the block number,0= <blockNo<=255
680
+ blockValue -the block value
681
+ Output
682
+
683
+
684
+ Return value:
685
+ 0:success, others:failed.
686
+
687
+
688
+ Source details:
689
+ ```text
690
+ Prototype
691
+ int writeBlock(int blockNo, byte[] blockValue)
692
+ Description
693
+ Write data to the block.
694
+ Parameters
695
+ Input
696
+ blockNo - the block number,0= <blockNo<=255
697
+ blockValue -the block value
698
+ Output
699
+
700
+ Return
701
+ 0:success, others:failed.
702
+ Remark
703
+ ```
704
+
705
+ ## increaseValue
706
+
707
+ Increment the value block by iMoney amount.
708
+
709
+ ```java
710
+ int increaseValue(int blockNo, byte[] value)
711
+ ```
712
+
713
+ - **类路径:** `com.urovo.sdk.rfcard.RFCardHandlerImpl`
714
+ - **Demo Activity(参考):** RFReaderActivity
715
+ - **源文档章节:** 10.11
716
+
717
+ - Source section: `10.11`
718
+
719
+ - Package/class path: `com.urovo.sdk.rfcard.RFCardHandlerImpl`
720
+
721
+ - Demo reference: `UrovoPosSdkDemo/app/src/main/java/com/urovo/sdk/view/RFReaderActivity.java`
722
+
723
+
724
+
725
+ Purpose:
726
+ Increment the value block by iMoney amount.
727
+
728
+
729
+ Signature/prototype:
730
+ ```java
731
+ int increaseValue(int blockNo, byte[] value)
732
+ ```
733
+
734
+
735
+ Parameters:
736
+ Input
737
+ blockNo - the block number,0= <blockNo<=255
738
+ value - the value
739
+ Output
740
+
741
+
742
+ Return value:
743
+ 0:success, others:failed.
744
+
745
+
746
+ Source details:
747
+ ```text
748
+ Prototype
749
+ int increaseValue(int blockNo, byte[] value)
750
+ Description
751
+ Increment the value block by iMoney amount.
752
+ Parameters
753
+ Input
754
+ blockNo - the block number,0= <blockNo<=255
755
+ value - the value
756
+ Output
757
+
758
+ Return
759
+ 0:success, others:failed.
760
+ Remark
761
+ ```
762
+
763
+ ## decreaseValue
764
+
765
+ Decrement the value block by iMoney amount.
766
+
767
+ ```java
768
+ int decreaseValue(int blockNo, byte[] value)
769
+ ```
770
+
771
+ - **类路径:** `com.urovo.sdk.rfcard.RFCardHandlerImpl`
772
+ - **Demo Activity(参考):** RFReaderActivity
773
+ - **源文档章节:** 10.12
774
+
775
+ - Source section: `10.12`
776
+
777
+ - Package/class path: `com.urovo.sdk.rfcard.RFCardHandlerImpl`
778
+
779
+ - Demo reference: `UrovoPosSdkDemo/app/src/main/java/com/urovo/sdk/view/RFReaderActivity.java`
780
+
781
+
782
+
783
+ Purpose:
784
+ Decrement the value block by iMoney amount.
785
+
786
+
787
+ Signature/prototype:
788
+ ```java
789
+ int decreaseValue(int blockNo, byte[] value)
790
+ ```
791
+
792
+
793
+ Parameters:
794
+ Input
795
+ blockNo - the block number,0= <blockNo<=255
796
+ value -the value.
797
+ Output
798
+
799
+
800
+ Return value:
801
+ 0:success, others:failed.
802
+
803
+
804
+ Source details:
805
+ ```text
806
+ Prototype
807
+ int decreaseValue(int blockNo, byte[] value)
808
+ Description
809
+ Decrement the value block by iMoney amount.
810
+ Parameters
811
+ Input
812
+ blockNo - the block number,0= <blockNo<=255
813
+ value -the value.
814
+ Output
815
+
816
+ Return
817
+ 0:success, others:failed.
818
+ Remark
819
+ ```
820
+
821
+ ## m1_amount _init
822
+
823
+ Init the value block by value.
824
+
825
+ ```java
826
+ int m1_amount_init(int blockNo, int value)
827
+ ```
828
+
829
+ - **类路径:** `com.urovo.sdk.rfcard.RFCardHandlerImpl`
830
+ - **Demo Activity(参考):** RFReaderActivity
831
+ - **源文档章节:** 10.13
832
+
833
+ - Source section: `10.13`
834
+
835
+ - Package/class path: `com.urovo.sdk.rfcard.RFCardHandlerImpl`
836
+
837
+ - Demo reference: `UrovoPosSdkDemo/app/src/main/java/com/urovo/sdk/view/RFReaderActivity.java`
838
+
839
+
840
+
841
+ Purpose:
842
+ Init the value block by value.
843
+
844
+
845
+ Signature/prototype:
846
+ ```java
847
+ int m1_amount_init(int blockNo, int value)
848
+ ```
849
+
850
+
851
+ Parameters:
852
+ Input
853
+ blockNo: the block number,0= <blockNo<=255
854
+
855
+
856
+ Return value:
857
+ 0:success, others:failed.
858
+
859
+
860
+ Source details:
861
+ ```text
862
+ Prototype
863
+ int m1_amount_init(int blockNo, int value)
864
+ Description
865
+ Init the value block by value.
866
+ Parameters
867
+ Input
868
+ blockNo: the block number,0= <blockNo<=255
869
+ Return
870
+ 0:success, others:failed.
871
+ Remark
872
+ ```
873
+
874
+ ## m1_amount_read
875
+
876
+ Read the amount for the block number.
877
+
878
+ ```java
879
+ int m1_amount_read(int blockNo)
880
+ ```
881
+
882
+ - **类路径:** `com.urovo.sdk.rfcard.RFCardHandlerImpl`
883
+ - **Demo Activity(参考):** RFReaderActivity
884
+ - **源文档章节:** 10.14
885
+
886
+ - Source section: `10.14`
887
+
888
+ - Package/class path: `com.urovo.sdk.rfcard.RFCardHandlerImpl`
889
+
890
+ - Demo reference: `UrovoPosSdkDemo/app/src/main/java/com/urovo/sdk/view/RFReaderActivity.java`
891
+
892
+
893
+
894
+ Purpose:
895
+ Read the amount for the block number.
896
+
897
+
898
+ Signature/prototype:
899
+ ```java
900
+ int m1_amount_read(int blockNo)
901
+ ```
902
+
903
+
904
+ Parameters:
905
+ Input
906
+ blockNo - the block number,0= <blockNo<=255
907
+
908
+
909
+ Return value:
910
+ The amount, negative number if failed.
911
+
912
+
913
+ Source details:
914
+ ```text
915
+ Prototype
916
+ int m1_amount_read(int blockNo)
917
+ Description
918
+ Read the amount for the block number.
919
+ Parameters
920
+ Input
921
+ blockNo - the block number,0= <blockNo<=255
922
+ Return
923
+ The amount, negative number if failed.
924
+ Remark
925
+ ```
926
+
927
+ ## m1_amount_restore
928
+
929
+ Move the content of a block into temporary data register.
930
+
931
+ ```java
932
+ int m1_amount_restore(int blockNo)
933
+ ```
934
+
935
+ - **类路径:** `com.urovo.sdk.rfcard.RFCardHandlerImpl`
936
+ - **Demo Activity(参考):** RFReaderActivity
937
+ - **源文档章节:** 10.15
938
+
939
+ - Source section: `10.15`
940
+
941
+ - Package/class path: `com.urovo.sdk.rfcard.RFCardHandlerImpl`
942
+
943
+ - Demo reference: `UrovoPosSdkDemo/app/src/main/java/com/urovo/sdk/view/RFReaderActivity.java`
944
+
945
+
946
+
947
+ Purpose:
948
+ Move the content of a block into temporary data register.
949
+
950
+
951
+ Signature/prototype:
952
+ ```java
953
+ int m1_amount_restore(int blockNo)
954
+ ```
955
+
956
+
957
+ Parameters:
958
+ Input
959
+ blockNo - the block number,0= <blockNo<=255
960
+
961
+
962
+ Return value:
963
+ 0:success, others:failed.
964
+
965
+
966
+ Source details:
967
+ ```text
968
+ Prototype
969
+ int m1_amount_restore(int blockNo)
970
+ Description
971
+ Move the content of a block into temporary data register.
972
+ Parameters
973
+ Input
974
+ blockNo - the block number,0= <blockNo<=255
975
+ Return
976
+ 0:success, others:failed.
977
+ Remark
978
+ ```
979
+
980
+ ## m1_amount_transfer
981
+
982
+ Transfer from temporary internal data register to value block.
983
+
984
+ ```java
985
+ int m1_amount_transfer(int blockNo)
986
+ ```
987
+
988
+ - **类路径:** `com.urovo.sdk.rfcard.RFCardHandlerImpl`
989
+ - **Demo Activity(参考):** RFReaderActivity
990
+ - **源文档章节:** 10.16
991
+
992
+ - Source section: `10.16`
993
+
994
+ - Package/class path: `com.urovo.sdk.rfcard.RFCardHandlerImpl`
995
+
996
+ - Demo reference: `UrovoPosSdkDemo/app/src/main/java/com/urovo/sdk/view/RFReaderActivity.java`
997
+
998
+
999
+
1000
+ Purpose:
1001
+ Transfer from temporary internal data register to value block.
1002
+
1003
+
1004
+ Signature/prototype:
1005
+ ```java
1006
+ int m1_amount_transfer(int blockNo)
1007
+ ```
1008
+
1009
+
1010
+ Parameters:
1011
+ Input
1012
+ blockNo - the block number,0= <blockNo<=255
1013
+
1014
+
1015
+ Return value:
1016
+ 0:success, others:failed.
1017
+
1018
+
1019
+ Source details:
1020
+ ```text
1021
+ Prototype
1022
+ int m1_amount_transfer(int blockNo)
1023
+ Description
1024
+ Transfer from temporary internal data register to value block.
1025
+ Parameters
1026
+ Input
1027
+ blockNo - the block number,0= <blockNo<=255
1028
+ Return
1029
+ 0:success, others:failed.
1030
+ Remark
1031
+ ```
1032
+
1033
+ ## exchangeApdu(Mifare)
1034
+
1035
+ APDU data communication for Mifare.
1036
+
1037
+ ```java
1038
+ byte[] exchangeApdu_M1(byte[] apdu, int... crcSpeed);
1039
+ ```
1040
+
1041
+ - **类路径:** `com.urovo.sdk.rfcard.RFCardHandlerImpl`
1042
+ - **Demo Activity(参考):** RFReaderActivity
1043
+ - **源文档章节:** 10.17
1044
+
1045
+ - Source section: `10.17`
1046
+
1047
+ - Package/class path: `com.urovo.sdk.rfcard.RFCardHandlerImpl`
1048
+
1049
+ - Demo reference: `UrovoPosSdkDemo/app/src/main/java/com/urovo/sdk/view/RFReaderActivity.java`
1050
+
1051
+
1052
+
1053
+ Purpose:
1054
+ APDU data communication for Mifare.
1055
+
1056
+
1057
+ Signature/prototype:
1058
+ ```java
1059
+ byte[] exchangeApdu_M1(byte[] apdu, int... crcSpeed);
1060
+ ```
1061
+
1062
+
1063
+ Parameters:
1064
+ Input
1065
+ apdu - apdu data.
1066
+ crcSpeed(int...) - int[0]=crc, int[1]=speed. //Opitional, variable length.
1067
+ Output
1068
+ None
1069
+
1070
+
1071
+ Return value:
1072
+ Return card response data when communication successful, return null when communication failed.
1073
+
1074
+
1075
+ Source details:
1076
+ ```text
1077
+ Prototype
1078
+ byte[] exchangeApdu_M1(byte[] apdu, int... crcSpeed);
1079
+ Description
1080
+ APDU data communication for Mifare.
1081
+ Parameters
1082
+ Input
1083
+ apdu - apdu data.
1084
+ crcSpeed(int...) - int[0]=crc, int[1]=speed. //Opitional, variable length.
1085
+ Output
1086
+ None
1087
+ Return
1088
+ Return card response data when communication successful, return null when communication failed.
1089
+ Remark
1090
+ ```