Class NfcYubiKeyManager

java.lang.Object
com.yubico.yubikit.android.transport.nfc.NfcYubiKeyManager

public class NfcYubiKeyManager
extends java.lang.Object
This class allows you to communicate with local NFC adapter
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static java.lang.String NFC_SETTINGS_ACTION
    Action for intent to tweak NFC settings in Android settings view on Q Android supports Settings.Panel.ACTION_NFC, we might update with release on Q
  • Constructor Summary

    Constructors 
    Constructor Description
    NfcYubiKeyManager​(android.content.Context context, NfcDispatcher dispatcher)
    Creates instance of NfcYubiKeyManager
  • Method Summary

    Modifier and Type Method Description
    void disable​(android.app.Activity activity)
    Disable active listening of nfc events
    void enable​(android.app.Activity activity, NfcConfiguration nfcConfiguration, com.yubico.yubikit.core.util.Callback<? super NfcYubiKeyDevice> listener)
    Enable discovery of nfc tags for foreground activity

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NFC_SETTINGS_ACTION

      public static final java.lang.String NFC_SETTINGS_ACTION
      Action for intent to tweak NFC settings in Android settings view on Q Android supports Settings.Panel.ACTION_NFC, we might update with release on Q
      See Also:
      Constant Field Values
  • Constructor Details

  • Method Details

    • enable

      public void enable​(android.app.Activity activity, NfcConfiguration nfcConfiguration, com.yubico.yubikit.core.util.Callback<? super NfcYubiKeyDevice> listener) throws NfcNotAvailable
      Enable discovery of nfc tags for foreground activity
      Parameters:
      activity - activity that is going to dispatch nfc tags
      nfcConfiguration - additional configurations for NFC discovery
      listener - the listener to invoke on NFC sessions
      Throws:
      NfcNotAvailable - in case NFC is turned off (but available)
    • disable

      public void disable​(android.app.Activity activity)
      Disable active listening of nfc events
      Parameters:
      activity - activity that goes to background or want to stop dispatching nfc tags