2727import com .regula .documentreader .api .params .ImageInputParam ;
2828import com .regula .documentreader .api .params .rfid .PKDCertificate ;
2929import com .regula .documentreader .api .results .DocumentReaderResults ;
30+ import com .regula .documentreader .api .errors .DocumentReaderException ;
3031
3132import org .json .JSONArray ;
3233import org .json .JSONException ;
@@ -276,9 +277,6 @@ public void error(String s) {
276277 case "initializeReader" :
277278 initializeReader (callback , args (0 ));
278279 break ;
279- case "initializeReaderWithDatabasePath" :
280- initializeReaderWithDatabasePath (callback , args (0 ), args (1 ));
281- break ;
282280 case "prepareDatabase" :
283281 prepareDatabase (callback , args (0 ));
284282 break ;
@@ -288,6 +286,9 @@ public void error(String s) {
288286 case "setRfidSessionStatus" :
289287 setRfidSessionStatus (callback , args (0 ));
290288 break ;
289+ case "initializeReaderWithDatabasePath" :
290+ initializeReaderWithDatabasePath (callback , args (0 ), args (1 ));
291+ break ;
291292 case "recognizeImageFrame" :
292293 recognizeImageFrame (callback , args (0 ), args (1 ));
293294 break ;
@@ -448,7 +449,7 @@ private void recognizeImageWithImageInputParams(@SuppressWarnings("unused") Call
448449 Instance ().recognizeImage (JSONConstructor .bitmapFromBase64 (base64Image ), new ImageInputParam (params .getInt ("width" ), params .getInt ("height" ), params .getInt ("type" )), getCompletion ());
449450 }
450451
451- private void recognizeImageWithOpts (Callback callback , final JSONObject opts , String base64Image ) throws JSONException {
452+ private void recognizeImageWithOpts (Callback callback , String base64Image , final JSONObject opts ) throws JSONException {
452453 RegulaConfig .setConfig (Instance (), opts , getContext ());
453454 recognizeImage (callback , base64Image );
454455 }
@@ -612,7 +613,7 @@ public void onPrepareProgressChanged(int progress) {
612613 }
613614
614615 @ Override
615- public void onPrepareCompleted (boolean status , Throwable error ) {
616+ public void onPrepareCompleted (boolean status , DocumentReaderException error ) {
616617 if (status )
617618 callback .success ("database prepared" );
618619 else
@@ -629,4 +630,4 @@ private IDocumentReaderInitCompletion getInitCompletion(Callback callback) {
629630 callback .error ("Init failed:" + error );
630631 };
631632 }
632- }
633+ }
0 commit comments