Class UsbOtpConnection
- java.lang.Object
-
- com.yubico.yubikit.android.transport.usb.connection.UsbOtpConnection
-
- All Implemented Interfaces:
com.yubico.yubikit.core.otp.OtpConnection,com.yubico.yubikit.core.YubiKeyConnection,java.io.Closeable,java.lang.AutoCloseable
public class UsbOtpConnection extends java.lang.Object implements com.yubico.yubikit.core.otp.OtpConnectionClass that provides interface to read and send data over YubiKey HID (keyboard) interfaceNOTE: when we release HID interface YubiKey will be recognized as keyboard again, it may give you a flash of UI on Android (notification how to handle Keyboard) which means your active Activity may got to background for a moment be aware of that and make sure that your app can handle that.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanisClosed()voidreceive(byte[] report)voidsend(byte[] report)Write single feature report
-
-
-
Method Detail
-
receive
public void receive(byte[] report) throws java.io.IOException- Specified by:
receivein interfacecom.yubico.yubikit.core.otp.OtpConnection- Throws:
java.io.IOException
-
send
public void send(byte[] report) throws java.io.IOExceptionWrite single feature report- Specified by:
sendin interfacecom.yubico.yubikit.core.otp.OtpConnection- Parameters:
report- blob size of FEATURE_RPT_SIZE- Throws:
java.io.IOException
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
isClosed
public boolean isClosed()
-
-