Package com.android.identity
Class ConnectionMethodBle
- java.lang.Object
-
- com.android.identity.ConnectionMethod
-
- com.android.identity.ConnectionMethodBle
-
public class ConnectionMethodBle extends ConnectionMethod
Connection method for BLE.
-
-
Constructor Summary
Constructors Constructor Description ConnectionMethodBle(boolean supportsPeripheralServerMode, boolean supportsCentralClientMode, java.util.UUID peripheralServerModeUuid, java.util.UUID centralClientModeUuid)Creates a new connection method for BLE.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataTransportcreateDataTransport(android.content.Context context, int role, DataTransportOptions options)Creates a newDataTransport-derived instance for the given type ofConnectionMethod.java.util.UUIDgetCentralClientModeUuid()Gets the UUID used for mdoc central client mode, if any.java.util.UUIDgetPeripheralServerModeUuid()Gets the UUID used for mdoc peripheral server mode, if any.booleangetSupportsCentralClientMode()Gets whether the connection method indicates that mdoc central client mode is enabled.booleangetSupportsPeripheralServerMode()Gets whether the connection method indicates that mdoc peripheral server mode is enabled.java.lang.StringtoString()-
Methods inherited from class com.android.identity.ConnectionMethod
combine, disambiguate
-
-
-
-
Constructor Detail
-
ConnectionMethodBle
public ConnectionMethodBle(boolean supportsPeripheralServerMode, boolean supportsCentralClientMode, @Nullable java.util.UUID peripheralServerModeUuid, @Nullable java.util.UUID centralClientModeUuid)Creates a new connection method for BLE.- Parameters:
supportsPeripheralServerMode- whether mdoc peripheral mode is supported.supportsCentralClientMode- whether mdoc central client mode is supported.peripheralServerModeUuid- the UUID to use for mdoc peripheral server mode.centralClientModeUuid- the UUID to use for mdoc central client mode.
-
-
Method Detail
-
getSupportsPeripheralServerMode
public boolean getSupportsPeripheralServerMode()
Gets whether the connection method indicates that mdoc peripheral server mode is enabled.- Returns:
- the value.
-
getSupportsCentralClientMode
public boolean getSupportsCentralClientMode()
Gets whether the connection method indicates that mdoc central client mode is enabled.- Returns:
- the value.
-
getPeripheralServerModeUuid
@Nullable public java.util.UUID getPeripheralServerModeUuid()
Gets the UUID used for mdoc peripheral server mode, if any.- Returns:
- the value or
null.
-
getCentralClientModeUuid
@Nullable public java.util.UUID getCentralClientModeUuid()
Gets the UUID used for mdoc central client mode, if any.- Returns:
- the value or
null.
-
createDataTransport
@NonNull public DataTransport createDataTransport(@NonNull android.content.Context context, int role, @NonNull DataTransportOptions options)
Description copied from class:ConnectionMethodCreates a newDataTransport-derived instance for the given type ofConnectionMethod.- Specified by:
createDataTransportin 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:
toStringin classjava.lang.Object
-
-