Class NfcYubiKeyManager
- java.lang.Object
-
- com.yubico.yubikit.android.transport.nfc.NfcYubiKeyManager
-
public class NfcYubiKeyManager extends java.lang.ObjectThis class allows you to communicate with local NFC adapter
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNFC_SETTINGS_ACTIONAction 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 ofNfcYubiKeyManager
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisable(android.app.Activity activity)Disable active listening of nfc eventsvoidenable(android.app.Activity activity, NfcConfiguration nfcConfiguration, com.yubico.yubikit.core.util.Callback<? super NfcYubiKeyDevice> listener)Enable discovery of nfc tags for foreground activity
-
-
-
Field Detail
-
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 Detail
-
NfcYubiKeyManager
public NfcYubiKeyManager(android.content.Context context, @Nullable NfcDispatcher dispatcher) throws NfcNotAvailableCreates instance ofNfcYubiKeyManager- Parameters:
context- the application contextdispatcher- optional implementation of NfcDispatcher to use instead of the default.- Throws:
NfcNotAvailable- if the Android device does not support NFC
-
-
Method Detail
-
enable
public void enable(android.app.Activity activity, NfcConfiguration nfcConfiguration, com.yubico.yubikit.core.util.Callback<? super NfcYubiKeyDevice> listener) throws NfcNotAvailableEnable discovery of nfc tags for foreground activity- Parameters:
activity- activity that is going to dispatch nfc tagsnfcConfiguration- additional configurations for NFC discoverylistener- 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
-
-