Integrating PN7160 to Android 11

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Integrating PN7160 to Android 11

Integrating PN7160 to Android 11

AN13189 provides guidelines for the integration of PN7160 NXP NCI-based NFC controller to an Android platform from software perspective. But some developers found some compile issues when integrating PN7160 NFC package into Android 11.

 

This article describes how to fix the build error when you integrating PN7160 NXP NCI-based NFC controller to Android 11 system.  You need to follow the AN13189 (PN7160 Android porting guide ) first.  After you run the installation script install_NFC.sh, the following modification should be added to the source code.

1) Open package/apps/Nfc/nci/jni/Android.bp

Add  "-DNXP_EXTNS=TRUE",

danielchen_0-1669219430784.png

 

2 )  open system/nfc/src/Android.bp

Add   "-DNXP_EXTNS=TRUE",

danielchen_1-1669219499127.png

 

 

3 )   open packages/apps/Nfc/src/com/android/nfc/NfcService.java

And add this: between isNfcSecureEnabled and setNfcSecure methods:

 

 

        @Override

        public IBinder getNfcAdapterVendorInterface(String vendor) {

            if(vendor.equalsIgnoreCase("nxp")){

                    return (IBinder) mNfcAdapter;

            } else {

                   return null;

            }

        }

 

danielchen_2-1669219613136.png

 

Next, follow AN13189, complete the following steps in section 4.2.

Then you can build the package successfully.  Thanks  @andraz_skupek .

 

 

 

100% helpful (1/1)
Version history
Last update:
‎11-29-2022 10:50 PM
Updated by: