Starting March 27, 2025, we recommend using android-latest-release instead of aosp-main to build and contribute to AOSP. For more information, see Changes to AOSP.
Stay organized with collections
Save and categorize content based on your preferences.
Android supports NFC card emulation with a secure element for off-host card
emulation. (For more information, see
Host-based card emulation overview.)
However, on the Android platform, the preferred payment service specified in the
Tap & pay setting isn't always synchronized with the app in the secure
element. This means it's possible that a nonpreferred payment service in the
secure element is used instead of the preferred payment service.
In Android 11, the off-host payment synchronization
feature provides a mechanism that lets you synchronize the payment
configuration in Tap & pay, the routing configuration on the contactless
frontend (CLF), and the app-selected state in the secure element.
The following diagram illustrates the design architecture of the off-host
payment synchronization feature.
Figure 1. Off host payment synchronization
design architecture
Implementation
To implement the off-host payment synchronization feature, the device must have
an NFC controller that supports the NCI 2.0 standard and must use the Android
Open Source Project NFC and Open Mobile Application Programming Interface
(OMAPI) frameworks.
Framework APIs
To implement off-host payment synchronization, use the following framework APIs
found in the Android Open Source Project:
To validate your implementation of the off-host payment synchronization feature,
install secure element apps with corresponding secure elements and then check
for appropriate responses from an NFC reader in different conditions.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-29 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# NFC off-host payment synchronization\n\nAndroid supports NFC card emulation with a secure element for off-host card\nemulation. (For more information, see\n[Host-based card emulation overview](https://developer.android.com/guide/topics/connectivity/nfc/hce).)\nHowever, on the Android platform, the preferred payment service specified in the\nTap \\& pay setting isn't always synchronized with the app in the secure\nelement. This means it's possible that a nonpreferred payment service in the\nsecure element is used instead of the preferred payment service.\n\nIn Android 11, the *off-host payment synchronization*\nfeature provides a mechanism that lets you synchronize the payment\nconfiguration in Tap \\& pay, the routing configuration on the contactless\nfrontend (CLF), and the app-selected state in the secure element.\n\nThe following diagram illustrates the design architecture of the off-host\npayment synchronization feature.\n**Figure 1.** Off host payment synchronization design architecture\n\nImplementation\n--------------\n\nTo implement the off-host payment synchronization feature, the device must have\nan NFC controller that supports the NCI 2.0 standard and must use the Android\nOpen Source Project NFC and Open Mobile Application Programming Interface\n(OMAPI) frameworks.\n\n### Framework APIs\n\nTo implement off-host payment synchronization, use the following framework APIs\nfound in the Android Open Source Project:\n\n- [`getAidsForPreferredPaymentService()`](https://developer.android.com/reference/android/nfc/cardemulation/CardEmulation#getAidsForPreferredPaymentService()): Retrieves the registered AIDs for the preferred payment service.\n- [`getRouteDestinationForPreferredPaymentService()`](https://developer.android.com/reference/android/nfc/cardemulation/CardEmulation#getDescriptionForPreferredPaymentService()): Retrieves the route destination for the preferred payment service.\n- [`getDescriptionForPreferredPaymentService()`](https://developer.android.com/reference/android/nfc/cardemulation/CardEmulation#getRouteDestinationForPreferredPaymentService()): Returns a user-visible description of the preferred payment service.\n- [`android.permission.NFC_PREFERRED_PAYMENT_INFO`](https://developer.android.com/reference/android/Manifest.permission#NFC_PREFERRED_PAYMENT_INFO) (permission): Allows apps to receive NFC preferred payment service information.\n- [`android.nfc.action.PREFERRED_PAYMENT_CHANGED`](https://developer.android.com/sdk/api_diff/r-dp1/changes/android.nfc.NfcAdapter) (broadcast action): Intent to notify if the preferred payment service changed.\n\nValidation\n----------\n\nTo validate your implementation of the off-host payment synchronization feature,\ninstall secure element apps with corresponding secure elements and then check\nfor appropriate responses from an NFC reader in different conditions."]]