Mobbeel for developers

Mobbeel for developers

  • MobbScan
  • MobbID
  • MobbSign
  • Clients
  • FAQ

›How to use

MobbScan React Native SDK

  • Getting started

How to use

  • Examples
  • API Reference
  • Error Handling
  • Troubleshooting

Migration Guides

  • Migration to 1.0.8
  • Migration to 2.16.0
  • Migration to 2.19.0
  • Migration to 2.20.0

Reference

  • Changelog

MobbScan React Native Examples

Basic example

import { NativeModules, DeviceEventEmitter } from "react-native";

let MobbscanAPI = NativeModules.MobbscanAPI;

//Init api and cleans plugin data
MobbscanAPI.initAPI("YOUR_LICENSE_HERE", data => {}, error => {});

//Sets api base url
MobbscanAPI.setBaseUrl("YOUR_MOBBSCAN_INSTANCE");

/* Starts scan
The document type is a String with all supported documents by MobbScan. For example: "ESPIDCard"
*/
MobbscanAPI.startScan(
  DOCUMENT_TYPE,
  OPERATION_MODE,
  (result, scanId) => {},
  error => {}
);

DeviceEventEmitter.addListener("SUCCESS_DETECTED_EVENT", data => {
  var imageDetectedBase64 = data.IMAGE_DETECTED;
});
DeviceEventEmitter.addListener("ERROR_DETECTED_EVENT", () => {});
DeviceEventEmitter.addListener("SUCCESS_SCAN_EVENT", data => {
  var result = data.RESULT;
  var idDocument = data.ID_DOCUMENT;
  var documentImageFace = data.DOCUMENT_IMAGE_FACE;
});
DeviceEventEmitter.addListener("ERROR_SCAN_EVENT", error => {});
DeviceEventEmitter.addListener("SUCCESS_DETECT_FACE_EVENT", data => {
  var imageUserFace = data.USER_IMAGE_FACE;
});
DeviceEventEmitter.addListener("ERROR_DETECT_FACE_EVENT", error => {});
DeviceEventEmitter.addListener("SUCCESS_MATCH_EVENT", data => {
  var score = data.SCORE;
});
DeviceEventEmitter.addListener("ERROR_MATCH_EVENT", error => {});

//Scan document side, it could be 'FRONT' or 'BACK'
MobbscanAPI.scanDocumentSide("FRONT");

/*
If you want detect face and get the matching score compared with the face of the document you can call to detectFace method.

It receives the mode, it could be: "DEFAULT", "LIVENESS_SMILE" and "LIVENESS_HEAD_MOVEMENT"
*/

MobbscanAPI.detectFace("LIVENESS_SMILE");
← Getting startedAPI Reference →
  • Basic example
Mobbeel for developers
Product Documentation
MobbIDMobbScanMobbSign
Connect
LinkedInFacebookX
More
FAQContact Us
Mobbeel Solutions SL
Copyright © 2025 Mobbeel Solutions SL