How to configure a Zebra reader for a Google Wallet NFC pass

Zebra Technologies offers a range of Android-based mobile devices for reading NFC passes from Apple Wallet and Google Wallet.

Currently available are the TC2X / TC5X / TC7X mobile devices (Zebra TC21, TC22, TC26, TC27, TC53, TC58, TC73, TC78) and the larger ET4x / ET6x tablets (Zebra ET40, ET45, ET60, ET65).

Zebra TC22 Mobile Computer from Zebra Technologies' TC2X series

Requirements

To set up the Zebra NFC reader, you’ll need your private Google Wallet NFC key, your Google Wallet NFC key ID and your Google Wallet collector id (see: How to create Google Wallet passes with NFC support).

You’ll also need the Zebra Value Added Services (VAS) SDK. Install the included Zebra VAS Service (for example: ZVS-Service-release-2.0.0.apk) on your Zebra device: https://www.zebra.com/us/en/support-downloads/software/mobile-computer-software/value-added-services-sdk.html

Configuration

Without Passmeister, things get complicated from here: To read Google Wallet NFC passes with your Zebra device, you’ll need to develop your own Android app. An example is the Zebra NFC Ticket Demo App: https://github.com/spoZebra/zebra-nfc-ticket-demo

In your app, start by including the Zebra VAS library from the Zebra VAS SDK (for example: zebranfcvas-release-2.0.1.aar):

// build.gradle.kts

dependencies {
    implementation(files("libs/zebranfcvas-release-2.0.1.aar"))
}

Implement the IZebraServiceConnection interface and initialize the ZebraNfcVas service:

class MainActivity : AppCompatActivity(), IZebraServiceConnection {
    ...
    override fun onCreate(savedInstanceState: Bundle?) {
        ...
        zebraNfcVas = ZebraNfcVas(this)
        zebraNfcVas.init()
        ...
    }
    ...
}

Configure the ZebraNfcVas service for your Google Wallet pass type. To read multiple Google Wallet pass types, all pass types must use the same collectorId from a shared redemption issuer:

override fun onServiceConnection() {
    val vasConfigs: MutableList = mutableListOf()
    val smartTapVasConfig = SmartTapVasConfig()
    smartTapVasConfig.setCollectorID(googleWalletCollectorId)
    smartTapVasConfig.setPrivateKey(
        googleWalletPrivateKey, googleWalletPrivateKeyId
    )
    vasConfigs.add(smartTapVasConfig)

    zebraNfcVas.createZebraNfcVasConfig()
    zebraNfcVas.setVasConfigs(vasConfigs)
    zebraNfcVas.connectToReader()
    zebraNfcVas.enableReadPassMode()
}

When a Google Wallet NFC pass is read, the service callback onPassDetected is triggered, allowing you to access the stored NFC data:

override fun onPassDetected(pass: Pass?) {
    ...
    Log.d("onPassDetected", String(pass.payloadMessage, StandardCharsets.UTF_8)
    ...
}

With Passmeister

With Passmeister, everything is easier: Just install the Passmeister app and scan your API key created in "Pass Settings / API Keys".
https://play.google.com/store/apps/details?id=com.passmeister.nfcreader

Your Zebra device is now ready to read your Google Wallet NFC passes!

updated on: 14 April 2024

No need to install a new app.

Your customers already have it - Wallet apps are pre-installed on all iPhones and most Android devices.

The most beautiful passes.

Simply upload a logo and an image - Passmeister automatically designs the most beautiful layouts.

The easiest API.

By developers, for developers - including full OpenAPI Specification and Swagger UI to interact with the API.