Click or drag to resize

PropertyID.BtSilentPairingWhitelisting Field

This parameter defines the devices whitelisted for the Bluetooth Silent Pairing.

Namespace: Com.Datalogic.Device.Configuration
Assembly: datalogic-xamarin-sdk (in datalogic-xamarin-sdk.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
public const Int32 BtSilentPairingWhitelisting = "value"

Field Value

Type: Int32
Remarks
This parameter defines the devices whitelisted for the Bluetooth Silent Pairing. The bluetooth silent pairing procedure required to be enabled by configuring the property BT_SILENT_PAIRING_WHITELISTING_ENABLE.

The class of the property is BlobProperty. The specific implementation for this type of blob is BluetoothSilentPairingWhitelisting.
To set this property by intent (Intents.ACTION_CONFIGURATION_COMMIT) use the serialized form:

 [["IDENTIFIER","value"],["IDENTIFIER","value"],["IDENTIFIER","value"]]
 

Using commit intent by android app, character " must be escaped as \".

To whitelist three devices by name, MAC and OUI with the commit intent:
 Intent intent = new Intent(Intents.ACTION_CONFIGURATION_COMMIT);
 HashMap map = new HashMap();
 map.put(PropertyID.BT_SILENT_PAIRING_WHITELISTING, "[[\"NAME\",\"Bluetooth device\"],[\"MAC_ADDRESS\",\"51:A9:EE:81:FA:BA\"],[\"OUI\",\"50:A9:EE\"]]");
 intent.putExtra(Intents.EXTRA_CONFIGURATION_CHANGED_MAP, map);
 mContext.sendBroadcast(intent);
 
To delete all devices:
 Intent intent = new Intent(Intents.ACTION_CONFIGURATION_COMMIT);
 HashMap map = new HashMap();
 map.put(PropertyID.BT_SILENT_PAIRING_WHITELISTING, "[]");
 intent.putExtra(Intents.EXTRA_CONFIGURATION_CHANGED_MAP, map);
 mContext.sendBroadcast(intent);
 


Using the commit intent by shell, characters , " and space must be escaped as "\," \" and " " respectively.

To whitelist three devices by name, MAC and OUI with the commit intent:
 adb shell am broadcast 
 -a com.datalogic.device.intent.action.configuration.COMMIT 
 --es com.datalogic.device.intent.extra.configuration.CHANGED_MAP 'BT_SILENT_PAIRING_WHITELISTING=[[\"NAME\""\,"\"Bluetooth" "device\"]"\,"[\"MAC_ADDRESS\""\,"\"51:A9:EE:81:FA:BA\"]"\,"[\"OUI\""\,"\"50:A9:EE\"]]'
 
To delete all devices:
 adb shell am broadcast 
 -a com.datalogic.device.intent.action.configuration.COMMIT 
 --es com.datalogic.device.intent.extra.configuration.CHANGED_MAP 'BT_SILENT_PAIRING_WHITELISTING=[]'
 

[Android Documentation]

See Also