Replies: 6 comments
-
Service discovery is automatically run as part of the The options of |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Do you call |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
No, this is not intended. In fact the connect call waits for the onServicesDiscovered callback from Android before it resolves. Seems like your OnePlus device somehow behaves differently. I have never seen this, but it could be that this is specific to the device, and not the fact that it is Android 13. Not sure if there is anything that can be done about this in the plugin. |
Beta Was this translation helpful? Give feedback.
-
I see. Well, I'm at a loss - maybe it's somehow connected to that |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
I have a BLE peripheral which doesn't change its services and characteristic at runtime (at least I think so, is there a way to test that?). When I connect to this peripheral from Android 11, from iOS 15 or from Chrome,
getServices()
seems to work as it should.When I try it from Android 13,
getServices()
returns an empty array.If I call
discoverServices()
first, thengetServices()
returns all the services as it should, returning 7 services I expect.If I then rebuild the app and try to do
getServices()
again without doingdiscoverServices()
first, I again get an empty array. The peripheral wasn't restarted in the meantime and its services should be the same.One thing to note: I do not provide any
services
noroptionalServices
torequestLEScan()
- can this be an issue?To Reproduce
requestLEScan()
. For options, I use justallowDuplicates
= truegetServices()
for that peripheral on Android 13discoverServices()
beforegetServices()
getServices()
Expected behavior
getServices()
should return the existing services of the peripheralPlugin version:
Desktop:
Smartphone:
Beta Was this translation helpful? Give feedback.
All reactions