Browse Source

更新文档

pull/1/head
周雪成 4 years ago
parent
commit
75893b2f29
2 changed files with 30 additions and 7 deletions
  1. BIN
      AI/demo/ocrdemo.rar
  2. 30
    7
      AI/安卓ocr接入.md

BIN
AI/demo/ocrdemo.rar View File


+ 30
- 7
AI/安卓ocr接入.md View File

@@ -75,7 +75,7 @@ OcrSDK sdk = OcrSDK.getInstance();
75 75
 sdk.init(OcrDemoActivity.this, credential,new OcrSDK.OcrLoginListener() {
76 76
     @Override
77 77
     public void onLoginSuccess() { //登录成功,拉起 SDK 页面
78
-        OcrSDK.getInstance().startIdCardFrontActivity( new OcrSDK.ResultListener<OcrSDK.IdCardFrontData>() {
78
+        OcrSDK.getInstance().startIdCardFrontActivity( new OcrSDK.IdCardFrontResultListener() {
79 79
             @Override
80 80
             public void onFailed(String errorCode, String errorMsg) {
81 81
                 //txtresult.setText("失败:错误码"+errorCode+";错误信息"+errorMsg);
@@ -128,7 +128,7 @@ public class OcrSDK {
128 128
      * 打开身份证正面识别
129 129
      * @param resultListener 用于返回识别结果
130 130
      */
131
-    public void startIdCardFrontActivity(ResultListener<IdCardFrontResult> resultListener) {
131
+    public void startIdCardFrontActivity(IdCardFrontResultListener resultListener) {
132 132
         //    ...
133 133
 
134 134
     }
@@ -138,7 +138,7 @@ public class OcrSDK {
138 138
      * 打开身份证背面识别
139 139
      * @param resultListener 用于返回识别结果
140 140
      */
141
-    public void startIdCardBackActivity(ResultListener<IdCardBackResult> resultListener) {
141
+    public void startIdCardBackActivity(IdCardBackResultListener resultListener) {
142 142
         //    ...
143 143
 
144 144
     }
@@ -147,7 +147,7 @@ public class OcrSDK {
147 147
      * 打开银行卡识别
148 148
      * @param resultListener 用于返回识别结果
149 149
      */
150
-    public void startBankCardActivity(ResultListener<BankCardResult> resultListener) {
150
+    public void startBankCardActivity(BankCardResultListener resultListener) {
151 151
         //    ...
152 152
 
153 153
     }
@@ -164,11 +164,34 @@ public class OcrSDK {
164 164
     /**
165 165
     * Ocr结果回调接口
166 166
     */
167
-    public interface ResultListener<T> {
168
-         
167
+    public interface IdCardFrontResultListener {
168
+        /**
169
+         * @RARAM exidCardResult SDK返回的识别结果的错误码
170
+         * @RARAM exidCardResult SDK返回的识别结果的错误信息
171
+         */
169 172
         void onFailed(String errorCode, String errorMsg);
170 173
 
171
-        void onFinish(T result);
174
+        void onFinish(IdCardFrontData result);
175
+    }
176
+
177
+    public interface IdCardBackResultListener {
178
+        /**
179
+         * @RARAM exidCardResult SDK返回的识别结果的错误码
180
+         * @RARAM exidCardResult SDK返回的识别结果的错误信息
181
+         */
182
+        void onFailed(String errorCode, String errorMsg);
183
+
184
+        void onFinish(IdCardBackData result);
185
+    }
186
+
187
+    public interface BankCardResultListener {
188
+        /**
189
+         * @RARAM exidCardResult SDK返回的识别结果的错误码
190
+         * @RARAM exidCardResult SDK返回的识别结果的错误信息
191
+         */
192
+        void onFailed(String errorCode, String errorMsg);
193
+
194
+        void onFinish(BankCardData result);
172 195
     }
173 196
 ```
174 197
 

Loading…
Cancel
Save