Class DataTransportNfc


  • public class DataTransportNfc
    extends DataTransport
    NFC data transport
    • Constructor Detail

    • Method Detail

      • setEDeviceKeyBytes

        public void setEDeviceKeyBytes​(@NonNull
                                       byte[] encodedEDeviceKeyBytes)
      • setIsoDep

        public void setIsoDep​(@NonNull
                              android.nfc.tech.IsoDep isoDep)
        Called by reader when finding the IsoDep tag.
        Parameters:
        isoDep - the tag with IsoDep technology.
      • processCommandApdu

        @Nullable
        public static byte[] processCommandApdu​(@NonNull
                                                android.nfc.cardemulation.HostApduService hostApduService,
                                                @NonNull
                                                byte[] apdu)
      • onDeactivated

        public static void onDeactivated​(int reason)
      • connect

        public void connect()
      • close

        public void close()
      • sendMessage

        public void sendMessage​(@NonNull
                                byte[] data)
      • sendTransportSpecificTerminationMessage

        public void sendTransportSpecificTerminationMessage()
      • supportsTransportSpecificTerminationMessage

        public boolean supportsTransportSpecificTerminationMessage()
      • getConnectionMethod

        @NonNull
        public ConnectionMethod getConnectionMethod()
        Description copied from class: DataTransport
        Returns a ConnectionMethod instance that can be used to connect to this transport.

        This is used for listening transports where the address to listen on is not known until the connection has been set up for example if dynamic TCP port assignments are used or cloud relays.

        For most data transports this will return the same ConnectionMethod instance that was passed at construction time. However for some transports where the address to listen on is not known until the connection have been set up (for example dynamic TCP listening port assignments or when a cloud relay is in use) it will differ.

        This cannot be called until the DataTransport.Listener.onConnectionMethodReady() callback has been fired.

        Specified by:
        getConnectionMethod in class DataTransport
        Returns:
        A ConnectionMethod-derived instance.