Implementation
By default our library will not handle Wallet compatible passes in Android. To enable this feature you need to make sure you add the following to your AndroidManifest.xml:
<activity
android:name="re.notifica.ui.PassbookActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:hardwareAccelerated="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="push.notifica.re"
android:pathPrefix="/pass/forapplication/{NOTIFICARE_APP_ID}"
android:scheme="https" />
</intent-filter>
</activity>
This will be the only thing needed to use our default UI to handle passes.
You can also request passes by their serial and retrieve the raw pass object:
try {
NotificarePass response = await notificare.fetchPassWithSerial(serial);
//Handle Success
} catch(e){
//Handle Error
}
If instead you wish to retrieve a pass using its custom barcode, you should use the following method:
try {
NotificarePass response = await notificare.fetchPassWithBarcode(barcode);
//Handle Success
} catch(e){
//Handle Error
}