Application not visible in Tap and Pay

后端 未结 3 781
独厮守ぢ
独厮守ぢ 2020-12-17 03:39

What is the key thing to adjust in NFC HCE application to get it visible under settings NFC Tap and Pay

Following code returns true for the app, so it\'s capable of

相关标签:
3条回答
  • 2020-12-17 04:04

    Additional information - if you forget the following two lines in the manifest, the application will also not show up in "tap and pay" menu.

    <uses-feature android:name="android.hardware.nfc.hce" android:required="true" />
    <uses-permission android:name="android.permission.NFC" />
    
    0 讨论(0)
  • 2020-12-17 04:04

    Using this Google sample project, I tried to add the suggestions by @Michael Roland (eg. adding android:apduServiceBanner, category and description).

    As a result, the graphic shows up in the Tap and Pay Settings screen, but not the text. I logged an issue with the sample project, but do not expect any resolution.

    The current workaround is to create a apduServiceBanner drawable that has the text built into the drawable.

    0 讨论(0)
  • 2020-12-17 04:19

    In order to be shown in the tap-and-pay menu, a HCE app must provide a banner graphic. You would include the graphic into the host-apdu-service XML using the android:apduServiceBanner attribute:

    <host-apdu-service xmlns:android="http://schemas.android.com/apk/res/android"
        android:requireDeviceUnlock="true"
        android:apduServiceBanner="@drawable/servicebanner">
    
        <aid-group android:category="payment"
                   android:description="@string/paymentGroup" >
            <aid-filter ... />
        </aid-group>
    </host-apdu-service>
    

    The service banner should be a graphic file (e.g. a .png file) with dimensions of 260 x 96 pixels.

    0 讨论(0)
提交回复
热议问题