Indicates that the card tokenization provider is VaccinePass.
refer
CardManager.addCard(AddCardInfo, AddCardListener) in detail.
CardManager cardManager = new CardManager(ct, pInfo);
String cardType = Card.CARD_TYPE_VACCINE_PASS;
String tokenizationProvider = AddCardInfo.PROVIDER_VACCINE_PASS;
String payload = "Please follow JSON object specification";
Bundle cardDetail = new Bundle();
cardDetail.putString(AddCardInfo.EXTRA_PROVISION_PAYLOAD, payload);
AddCardInfo addCardInfo = new AddCardInfo(cardType, tokenizationProvider, cardDetail);
cardManager.addCard(addCardInfo, new AddCardListener() {
@Override
public void onSuccess(int status, Card card) {
Log.d(TAG, "onSuccess callback is called");
}
@Override
public void onFail(int errorCode, Bundle errorData ) {
Log.e(TAG, "onFail callback is called, errorCode: " + errorCode);
if (errorData != null && errorData.containsKey(SpaySdk.EXTRA_ERROR_REASON_MESSAGE)) {
Log.e(TAG, "onFail extra reason message: " + errorData.getString(SpaySdk.EXTRA_ERROR_REASON_MESSAGE));
}
}
@Override
public void onProgress(int currentCount, int totalCount, Bundle bundleData) {
Log.d(TAG,"onProgress callback is called : " + currentCount + " / " + totalCount);
}
});
Json Object Specification
Mandatory fields: version, cardId, type, cardArt, qrData, decoding, chunks, chunk,
provider.name, patient.name, vaccine.product, vaccine.date, performer
{
"version": "1.0",
"cardId": "xxxx-xxxxx-xxxxxxxxx",
"type": "VaccinationRecordCard",
"cardArt": "https://issuer.logo.url.location/logo.png",
"qrData" : {
"decoding": "None",
"chunks": [
"shc:/012345678901234567890123456789"
]
},
"expirationDate": "20231011",
"provider": {
"name": "Vaccine Pass Provider Name"
},
"issuer": {
"name": "Vaccine Pass Issuer Name"
},
"patient": {
"dateOfBirth": "19510120",
"name": {
"family": "Anyperson",
"given": "John B."
}
},
"vaccinations": [
{
"vaccine": {
"product": "Moderna",
"lot": "0000001",
"date": "20210101"
},
"performer": {
"name": "ABC General Hospital",
"identityAssuranceLevel": "IAL1.2"
}
},
{
"vaccine": {
"product": "Moderna",
"lot": "0000007",
"date": "20210129"
},
"performer": {
"name": "ABC General Hospital",
"identityAssuranceLevel": "IAL1.2"
}
}
]
}