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

Scan throws error on android 13+ #276

Open
CatchABus opened this issue Dec 11, 2023 · 3 comments
Open

Scan throws error on android 13+ #276

CatchABus opened this issue Dec 11, 2023 · 3 comments

Comments

@CatchABus
Copy link
Contributor

It seems that android 13+ devices need an additional permission for BLE scan.
Error log:

Error: java.lang.SecurityException: Permission Denial: starting Intent { act=android.bluetooth.adapter.action.REQUEST_ENABLE cmp=com.android.settings/.bluetooth.RequestPermissionActivity } from ProcessRecord{e7d2f4d 5142:com.fuelics.mobile.alpha/u0a159} (pid=5142, uid=10159) requires android.permission.BLUETOOTH_CONNECT undefined

Google claimed that this permission was useful for devices that were already paired in API 31 https://developer.android.com/develop/connectivity/bluetooth/bt-permissions. That doesn't seem to be the case anymore.

@farfromrefug
Copy link
Member

@CatchABus indeed it is now required. you can ask for it with @nativescript-community/perms

@CatchABus
Copy link
Contributor Author

@CatchABus indeed it is now required. you can ask for it with @nativescript-community/perms

That's what I eventually did. I think we should remove any kind of permission logic in plugin (location) and update documentation to instruct users to install perms as well.

@farfromrefug
Copy link
Member

@CatchABus I feel exactly the same. never did it because it would break current usage. but I guess we could do a major update without permissions
one note though GPS state requires permission to work. same for ble I think.
not sure if it is an issue or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants