capacitor-community / bluetooth-le

Capacitor plugin for Bluetooth Low Energy
MIT License
274 stars 79 forks source link

Scanning possible when bluetooth is off #628

Open juniorsaraviao opened 6 months ago

juniorsaraviao commented 6 months ago

Describe the bug When the Bluetooth is off, the plugin can still detect Bluetooth devices (this only happens on Android). Even it's possible to connect.

To Reproduce Steps to reproduce the behavior:

  1. Clone the project https://github.com/juniorsaraviao/BluetoothSample/tree/master
  2. Run the project on Android.
  3. Turn off the Bluetooth.
  4. Tap Scan.

Expected behavior The plugin shouldn't be able to detect devices when the Bluetooth is off.

Screenshots Issue

Plugin version:

Desktop (please complete the following information):

Smartphone (please complete the following information):

juniorsaraviao commented 5 months ago

any updates related to this issue?

pwespi commented 5 months ago

I cannot reproduce this on my test devices. Were you able to reproduce this on multiple different devices?

peitschie commented 5 months ago

Just passing through... I've have seen this with some Android phones (specifically with a Nokia device on Android 10). No idea why some phones allow it... But it never seemed to me to be a plugin kind of bug.

If the firmware and hardware in Android allow it... Should the plugin really be concerned about preventing this?

juniorsaraviao commented 4 months ago

Hi everyone, I could replicate the same issue using a Samsung Galaxy A11 (Android 12) physical device

ehsieh-semios commented 3 months ago

I recall this is a defect from the firmware (seen in Samsung phones), maybe you can try to "normalize" it by off and on before the next scanning

abdh-dev commented 2 weeks ago

Oh yeah this also happened to me with my samsung galaxy a12 (android version 13) phone, at first it was unusual but i never paid much attention to it until i found this issue