How to know if Bluetooth connection is lost when application is running in Xamarin Forms. Any listener will hit?

Sk 61 Reputation points
2024-05-03T14:00:27.1533333+00:00

How we can know if bluetooth connection is lost or turned off when we are running the application without any Button click event. App is connected to some ble devices . How to handle the scenario ?

Any listener will hit or not?

private void OnDeviceDisconnected(object sender, BleDeviceEventArgs e)
{
}

Above method is not hitting.

Can anyone please help me

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,317 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
780 questions
{count} votes