Class NfcConfiguration

  • All Implemented Interfaces:

    
    public class NfcConfiguration
    
                        

    Additional configurations for NFC discovery

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public int timeout
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      int getTimeout()
      boolean isDisableNfcDiscoverySound()
      boolean isSkipNdefCheck()
      boolean isHandleUnavailableNfc()
      NfcConfiguration disableNfcDiscoverySound(boolean disableNfcDiscoverySound) Setting this flag allows the caller to prevent the platform from playing sounds when it discovers a tag.
      NfcConfiguration skipNdefCheck(boolean skipNdefCheck) Setting this flag allows the caller to prevent the platform from performing an NDEF check on the tags it
      NfcConfiguration handleUnavailableNfc(boolean handleUnavailableNfc) Set it to true to shows view with settings nfc setting if NFC is disabled, otherwise start of NFC session will return error in callback if no permissions/setting and allows user to handle disabled NFC reader (show error or snackbar or refer to settings) Default value is false
      NfcConfiguration timeout(int timeout) The timeout to use for wireless communication.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NfcConfiguration

        NfcConfiguration()
    • Method Detail

      • disableNfcDiscoverySound

         NfcConfiguration disableNfcDiscoverySound(boolean disableNfcDiscoverySound)

        Setting this flag allows the caller to prevent the platform from playing sounds when it discovers a tag.

        Parameters:
        disableNfcDiscoverySound - new value of this property
        Returns:

        configuration object

      • skipNdefCheck

         NfcConfiguration skipNdefCheck(boolean skipNdefCheck)

        Setting this flag allows the caller to prevent the platform from performing an NDEF check on the tags it

        Parameters:
        skipNdefCheck - new value of this property
        Returns:

        configuration object

      • handleUnavailableNfc

         NfcConfiguration handleUnavailableNfc(boolean handleUnavailableNfc)

        Set it to true to shows view with settings nfc setting if NFC is disabled, otherwise start of NFC session will return error in callback if no permissions/setting and allows user to handle disabled NFC reader (show error or snackbar or refer to settings) Default value is false

        Parameters:
        handleUnavailableNfc - new value of this property
        Returns:

        configuration object

      • timeout

         NfcConfiguration timeout(int timeout)

        The timeout to use for wireless communication.

        Parameters:
        timeout - the timeout in milliseconds
        Returns:

        configuration object