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 ReactNative module, you will need to add the following dependency to your build.gradle

1
2
3
4
dependencies {
  ...more
  implementation "re.notifica:notificare-scannable:2.1.1"
}

To start a scanning session, use the following method:

1
notificare.startScannableSession();

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

1
2
3
4
5
6
7
8
notificare.onEventReceived.listen((NotificareEvent event) async {
  if (event.name == "scannableSessionInvalidatedWithError") {
    //The QRCode scanning session ended with an error
  }
  if (event.name == "scannableDetected") {
    //The QRCode scanning session ended with a valid result, handle it accordingly
  }
});