0.0.1 • Published 4 years ago

cordova-plugin-zetes-eid v0.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 years ago

cordova-plugin-zetes-eid

Cordova plugin for reading Belgium Electronic ID cards with the Zetes BR301 bluetooth card reader on android devices.

Usage

cordova plugin add cordova-plugin-zetes-eid

API

This plugin provides a global object "EidPluginZetes" containing 4 Android API calls for reading Belgian ID cards.

Overview

  • EidPluginZetes.initialize(deviceName, successCallback, rejectCallback)
  • EidPluginZetes.readCard(properties, successCallback, rejectCallback)
  • EidPluginZetes.listenForCard(properties, successCallback, rejectCallback)
  • EidPluginZetes.stopListeningForCard(successCallback, rejectCallback)

EidPluginZetes.initialize(deviceName, successCallback, rejectCallback)

Initialize the plugin for a specific zetes bluetooth device. The possible options are:

  • feitian: BR301 bluetooth card reader
  • zetes: BR301BLE bluetooth card readerThis method should always be called before any other API call.

EidPluginZetes.readCard(properties, successCallback, rejectCallback)

Read specific properties from an ID card. This method will return a success or error callback when it has finished reading.

Options

  • properties is a JSONArray of cardproperties. The following properties are allowed:

    • firstname
    • name
    • otherName
    • nationality
    • sex
    • cardnumber
    • documentType
    • chipnumber
    • cardValidityDateBegin
    • cardValidityDateEnd
    • cardDeliveryMunicipality
    • nationalNumber
    • birthLocation
    • birthDate
    • nobleCondition
    • specialStatus
    • hashPhoto
    • duplicata
    • specialOrganisation
    • memberOfFamily
    • streetNumber
    • zipcode
    • municipality

    Example:

        var properties = ['cardnumber', 'firstname', 'name', 'zipcode'];
        EidPlugin.readCard(properties, function(result){
            console.log('successfully retrieved card data: ', result);
        }, function(error){
            console.log('An error occurred while retrieving card data: ', error);
        });

EidPluginZetes.listenForCard(properties, successCallback, rejectCallback)

Listen for ID card input and read specific ID card properties when inserted. This method will return a success or error callback when it has finished reading.

Options

  • properties is a JSONArray of properties. The same properties can be used as in the EidPlugin.readCard API call.

Example:

      var properties = ['cardnumber', 'firstname', 'name', 'zipcode'];
      EidPluginZetes.listenForCard(properties, function(result){
          console.log('successfully retrieved card data: ', result);
      }, function(error){
          console.log('An error occurred while retrieving card data: ', error);
      });

EidPluginZetes.stopListeningForCard(properties, successCallback, rejectCallback)

0.0.1

4 years ago