Enabling Bluetooth Adapter doesnot work
Closed this issue · 1 comments
paulthedev commented
As per Android bluetooth API this snippet works
BluetoothAdapter bluetooth = BluetoothAdapter.DefaultAdapter;
bluetooth.Enable();
but ble.net implementation code snippet doesn't work
if(ble.AdapterCanBeEnabled && ble.CurrentState.IsDisabledOrDisabling()) {
await ble.EnableAdapter();
}
I have Bluetooth admin permission enabled
paulthedev commented
Wait added this line:
BluetoothLowEnergyAdapter.Init(this);
before this:
var bluetoothAdapter = BluetoothLowEnergyAdapter.ObtainDefaultAdapter(ApplicationContext);
works now