SDK

Scannables

This functionality will allow your app to present content after they have scanned a NFC Tag or QR Code (we use QR Codes whenever the device does not support or permits NFC). This could be extremely useful if you looking to extend physical objects with engaging content pretty much the same way you do when sending a notification.

Before you can start using this functionality you will need to create one or more tags in our dashboard. This is covered in our guides located here.

This functionality is not included by default in our Cordova plugin, you will need to add the following dependency to your /platforms/android/app/build.gradle

dependencies {
  ...more
  implementation "re.notifica:notificare-scannable:2.2.0"
}

To start a scanning session, use the following method:

Notificare.startScannableSession();
await Notificare.startScannableSession();

Whenever you invoke this method, the following events will be triggered. You should handle them accordingly:

Notificare.on('scannableSessionInvalidatedWithError', function(data) {
  //The QRCode scanning session ended with an error
});

Notificare.on('scannableDetected', function(data) {
  //The QRCode scanning session ended with a valid result, handle it accordingly
});
Notificare.on('scannableSessionInvalidatedWithError', (data) => {
    //The QRCode scanning session ended with an error
});

Notificare.on('scannableDetected', (data) => {
    //The QRCode scanning session ended with a valid result, handle it accordingly
});