Closed kle-wang closed 4 months ago
https://issuetracker.google.com/issues/304893289?pli=1
This issue is observed in the field a lot with our end users on phones running Android 13 and higher.
Looking at the source where it happens, it's easily explained that the issue starts whenever the
onGetGattDb
method is invoked by thread A while thread B is still busy performing a GATT operation (read, write, registering notifications, etc.), filling the mRestrictedHandles map with handles pointing to characteristics that are not 'restricted' at all.
This is fixed in Android 15 Beta 2.
Please update to Android 15 Beta and verify.
Thank you!
In our country.Most people's phones are based on manufacturer modified ROM systems, which may not be able to update Android versions in a timely manner. Is there a way to solve this problem? Do you have any suggestions, such as adding message queues or reading whether the system is currently busy?
we already use message queues.
I don't have a better solution.
you can try to read the android source code to understand the issue better.
this is an android issue. no workaround that i know of.
In our country.Most people's phones are based on manufacturer modified ROM systems, which may not be able to update Android versions in a timely manner. Is there a way to solve this problem? Do you have any suggestions, such as adding message queues or reading whether the system is currently busy?
Have you solved this problem?
No...May be in ios i use ble and android use spp...
Can you tell me how you solved this problem? I have this problem in Bluetooth subscription
KLe-Wang @.***>于2024年7月30日 周二19:46写道:
No...May be in ios i use ble and android use spp...
— Reply to this email directly, view it on GitHub https://github.com/boskokg/flutter_blue_plus/issues/932#issuecomment-2258155181, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC6Q4WO6GSKWBGNXLLQDCHLZO54ITAVCNFSM6AAAAABK3WZ6IWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJYGE2TKMJYGE . You are receiving this because you commented.Message ID: @.***>
ahhh 我用经典蓝牙的spp了 老铁
谢谢,我直接用flutter_reactive_ble解决了这个问题
KLe-Wang @.***> 于2024年7月30日周二 23:13写道:
ahhh 我用经典蓝牙的spp了 老铁
— Reply to this email directly, view it on GitHub https://github.com/boskokg/flutter_blue_plus/issues/932#issuecomment-2258596342, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC6Q4WNDQWRI5C6LLKOP4VLZO6UTFAVCNFSM6AAAAABK3WZ6IWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJYGU4TMMZUGI . You are receiving this because you commented.Message ID: @.***>
Requirements
Have you checked this problem on the example app?
Yes
FlutterBluePlus Version
1.32.7
Flutter Version
3.22.1
What OS?
Android
OS Version
android 14
Bluetooth Module
earphone
What is your problem?
When I try to connect my device, I may not be able to subscribe to the notification service's uuid and encounter an error. This error is usually resolved by turning on the Bluetooth switch again or waiting a few minutes to try connecting again. Is there any way to solve this matter. This incident occurred on my Redmi K60 phone, but I did not find this issu e on the Samsung S20 model. At the same time, I discovered a connection issue in the Android BLE GitHub for your reference. github page : https://github.com/NordicSemiconductor/Android-BLE-Library/issues/507
Logs