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 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 module to avoid apps being rejected when you are not planning to use this functionality. If you do want to use native NFC scanning, please read our native iOS guides located here.
You can however use our built-in QRCode scanner to unlock content stored in all the Scannable Tags you create in our dashboard. To start a QRCode 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('qrCodeScannerStarted', function(data) {
//The QRCode built-in view started
});
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('qrCodeScannerStarted', (data) => {
//The QRCode built-in view started
});
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
});