Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable function not working on Android #555

Closed
ricklens opened this issue Jul 19, 2023 · 2 comments
Closed

Enable function not working on Android #555

ricklens opened this issue Jul 19, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@ricklens
Copy link

Describe the bug
When disabling the Bluetooth adaptor, calling the enable function doesn't enable the BT adaptor, keeps raising an excepition : Enable Failed.

Also I am able to process data even if the Bluetooth adaptor is disabled.

@ricklens ricklens added the bug Something isn't working label Jul 19, 2023
@pwespi
Copy link
Member

pwespi commented Jul 22, 2023

What version of Android are you using? And what device are you testing on?

The underlying enable and disable methods of BluetoothAdapter in Android are deprecated. See https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#enable(). So the methods will be removed in a future version of the plugin and might already stop working on newer Android phones. I just added a deprecation note to the docs about this.

@github-actions
Copy link

It looks like this issue didn't get the information it needed, so I'll close it for now. If I made a mistake, sorry! I am just a bot.

Have a great day!
Capacitor Community Bot 💙

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants