Package com.android.identity
Class ConnectionMethodNfc
- java.lang.Object
-
- com.android.identity.ConnectionMethod
-
- com.android.identity.ConnectionMethodNfc
-
public class ConnectionMethodNfc extends ConnectionMethod
Connection method for NFC.
-
-
Constructor Summary
Constructors Constructor Description ConnectionMethodNfc(long commandDataFieldMaxLength, long responseDataFieldMaxLength)
Creates a new connection method for NFC.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataTransport
createDataTransport(android.content.Context context, int role, DataTransportOptions options)
Creates a newDataTransport
-derived instance for the given type ofConnectionMethod
.long
getCommandDataFieldMaxLength()
Gets the maximum length for the command data field.long
getResponseDataFieldMaxLength()
Gets the maximum length for the response data field.java.lang.String
toString()
-
Methods inherited from class com.android.identity.ConnectionMethod
combine, disambiguate
-
-
-
-
Constructor Detail
-
ConnectionMethodNfc
public ConnectionMethodNfc(long commandDataFieldMaxLength, long responseDataFieldMaxLength)
Creates a new connection method for NFC.- Parameters:
commandDataFieldMaxLength
- the maximum length for the command data field.responseDataFieldMaxLength
- the maximum length of the response data field.
-
-
Method Detail
-
getCommandDataFieldMaxLength
public long getCommandDataFieldMaxLength()
Gets the maximum length for the command data field.- Returns:
- the value.
-
getResponseDataFieldMaxLength
public long getResponseDataFieldMaxLength()
Gets the maximum length for the response data field.- Returns:
- the value.
-
createDataTransport
@NonNull public DataTransport createDataTransport(@NonNull android.content.Context context, int role, @NonNull DataTransportOptions options)
Description copied from class:ConnectionMethod
Creates a newDataTransport
-derived instance for the given type ofConnectionMethod
.- Specified by:
createDataTransport
in classConnectionMethod
- Parameters:
context
- application context.role
- whether the transport will be used by the mdoc or mdoc reader.options
- options for configuring the created instance.- Returns:
- A
DataTransport
-derived instance configured with the given options.
-
toString
@NonNull public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-