BluetoothSilentPairingWhitelistingAddByName Method |
Whitelist a new device identified with the given name.
Namespace:
Com.Datalogic.Decode
Assembly:
datalogic-xamarin-sdk (in datalogic-xamarin-sdk.dll) Version: 1.0.0.0
(1.0.0.0)
Syntax
public virtual bool AddByName (string deviceName);
Public Virtual Boolean AddByName (String deviceName);
Parameters
- deviceName
- Type: System.String
String - The device name can be provided as a plain string or as a regular expression (regex).
If a regex is used, any device whose name matches the pattern will be added to the whitelist.
Return Value
Type: System.Boolean
boolean - Returns true if the entry has been successfully added to the whitelist;
otherwise, false .
Remarks
Whitelist a new device identified with the given name.
If the entry already exists, the value will not be updated.
The device name can also be provided as a regular expression (regex),
allowing for more flexible matching of device names.
This feature enables the addition of multiple devices that match a certain pattern,
rather than requiring an exact name match.
The advantage of supporting regular expressions is that it allows for more flexible and dynamic whitelisting,
such as adding devices that share a common naming pattern without having to specify each name individually.
[Android Documentation]
See Also