קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
Android תומך באמולציה של כרטיס NFC עם רכיב מאובטח לאמולציה של כרטיס מחוץ למארח. (מידע נוסף זמין במאמר סקירה כללית על אמולציה של כרטיסים מבוססי מארח).
עם זאת, בפלטפורמת Android, שירות התשלומים המועדף שצוין בהגדרה 'הקש ושלם' לא תמיד מסתנכרן עם האפליקציה ברכיב המאובטח. כלומר, יכול להיות שברכיב המאובטח נעשה שימוש בשירות תשלומים שאינו מועדף במקום בשירות התשלומים המועדף.
ב-Android 11, התכונה סנכרון תשלומים מחוץ למארח מספקת מנגנון שמאפשר לסנכרן את הגדרות התשלום ב'הקשה לתשלום', את הגדרות הניתוב בחזית ללא מגע (CLF) ואת המצב שנבחר על ידי האפליקציה ברכיב המאובטח.
התרשים הבא מדגים את ארכיטקטורת העיצוב של תכונת סנכרון התשלומים מחוץ למארח.
איור 1. הארכיטקטורה של תכנון סנכרון התשלומים מחוץ למארח
הטמעה
כדי להטמיע את התכונה 'סנכרון תשלומים מחוץ למארח', המכשיר צריך לכלול בקר NFC שתומך בתקן NCI 2.0, ולהשתמש במסגרות של Android Open Source Project NFC ו-Open Mobile Application Programming Interface (OMAPI).
ממשקי API של מסגרות
כדי להטמיע סנכרון תשלומים מחוץ למארח, צריך להשתמש בממשקי ה-API הבאים של המסגרת שנמצאים בפרויקט Android Open Source:
כדי לאמת את ההטמעה של תכונת הסנכרון של תשלומים מחוץ למארח, צריך להתקין אפליקציות של רכיבים מאובטחים עם רכיבים מאובטחים תואמים, ולאחר מכן לבדוק אם מתקבלות תגובות מתאימות ממכשיר קריאת NFC בתנאים שונים.
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-07-27 (שעון 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."]]