to top
Datalogic APIs
public final enum

BTPairingPolicy

extends Enum<E extends Enum<E>>
java.lang.Object
   ↳ java.lang.Enum<E extends java.lang.Enum<E>>
     ↳ com.datalogic.device.configuration.BTPairingPolicy

Class Overview

Enum BTPairingPolicy defines the policies for Bluetooth pairing, configured through the property BT_PAIRING_POLICY.

Each policy controls the level of user interaction required during the Bluetooth pairing process, ranging from the standard Android experience to fully silent or secured pairing.

Summary

Enum Values
BTPairingPolicy  SECURED  Secured pairing that blocks connections from unauthorized peripherals. 
BTPairingPolicy  SILENT  Fully silent pairing with no user confirmation required. 
BTPairingPolicy  SIMPLE  Simplified pairing requiring only a single user confirmation. 
BTPairingPolicy  STANDARD  Standard Android user experience for Bluetooth pairing. 
BTPairingPolicy  UNKNOWN  Unknown pairing policy. 
Public Methods
static BTPairingPolicy fromInt(int n)
Retrieves the corresponding BTPairingPolicy value, from a valid integer.
int toInt()
Converts the BTPairingPolicy enum to its integer representing value.
static BTPairingPolicy valueOf(String name)
final static BTPairingPolicy[] values()
[Expand]
Inherited Methods
From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum Values

public static final BTPairingPolicy SECURED

Added in revision 48

Secured pairing that blocks connections from unauthorized peripherals.

This policy enhances security and operational efficiency by preventing accidental or malicious device pairings. Only devices that are whitelisted (if enabled) or trusted (if enabled) are allowed to pair and connect.

The following properties must be properly configured:

public static final BTPairingPolicy SILENT

Added in revision 36

Fully silent pairing with no user confirmation required.

When this value is selected, the user will never be prompted during Bluetooth device pairing.

Important: This policy allows any device to pair without user consent. Use with caution.

public static final BTPairingPolicy SIMPLE

Added in revision 36

Simplified pairing requiring only a single user confirmation.

When this value is selected, the user will be prompted with a single popup confirmation to pair a Bluetooth device.

public static final BTPairingPolicy STANDARD

Added in revision 36

Standard Android user experience for Bluetooth pairing.

When this value is selected, the user will be prompted to pair a Bluetooth device following the standard Android procedure.

public static final BTPairingPolicy UNKNOWN

Added in revision 36

Unknown pairing policy.

Public Methods

public static BTPairingPolicy fromInt (int n)

Added in revision 36

Retrieves the corresponding BTPairingPolicy value, from a valid integer.

Parameters
n int
Returns
  • Type the corresponding one.

public int toInt ()

Added in revision 36

Converts the BTPairingPolicy enum to its integer representing value.

Returns
  • int

public static BTPairingPolicy valueOf (String name)

Added in revision 36

public static final BTPairingPolicy[] values ()

Added in revision 36