AuthRequest Event
Fired when a device requests authentication.
Syntax
public event OnAuthRequestHandler OnAuthRequest; public delegate void OnAuthRequestHandler(object sender, BtinfoAuthRequestEventArgs e); public class BtinfoAuthRequestEventArgs : EventArgs { public string Address { get; } public string Name { get; } public string Password { get; set; } public bool Accept { get; set; } }
Public Event OnAuthRequest As OnAuthRequestHandler Public Delegate Sub OnAuthRequestHandler(sender As Object, e As BtinfoAuthRequestEventArgs) Public Class BtinfoAuthRequestEventArgs Inherits EventArgs Public ReadOnly Property Address As String Public ReadOnly Property Name As String Public Property Password As String Public Property Accept As Boolean End Class
Remarks
This event fires when a device requests authentication. This will only fire if StartAuthMonitor has been previously called.
Address holds the Bluetooth address. For instance "00:02:72:C6:64:B7".
Name is the name of the device.
Password defines the password to be sent back to the device. This parameter will always be empty when the event fires and must be set within the event.
Accept specifies whether to accept the request. The default value is False. This must be set to True within this event to accept the request.