-
Notifications
You must be signed in to change notification settings - Fork 575
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
Unable to add service to advertisement payload using the mock RxBleClient/RxBleDevice #34
Comments
I did quick test for this issue
Am I missing something?
Could you provide a code snippet with your mock? |
Thanks for the quick response @uKL. Here's some code:
|
Ok, fun fact. Mock was not released to central yet (strange, we will do a release soon then @dariuszseweryn gets back from WWDC). How did you build mocking support? It looks like we had this issue in earlier version but in master it should be fixed already. |
Shoot my bad. I just grabbed the files directly from the repo because I couldn't get them from the gradle script (eventually saw this issue #20). I am using these 3 files located here: https://github.com/Polidea/RxAndroidBle/tree/master/mockrxandroidble/src/main/java/com/polidea/rxandroidble/mockrxandroidble Is there maybe a newer branch than master with mock class updates on it? |
Master is the newest one and it should work. Those three files is everything you need. I ran your test and guess what... it's passing :) What's in your |
It was a method that returned a specific I noticed there were some updates on the |
@pfives I'm not able to reproduce this issue. I tried to run your sample and both calls:
return correct value. Please recheck if you can reproduce the issue in the newest version of the library. |
Since the issue was not reproducible by @mzgreen and there is no other information. I am closing this. |
Summary
Using the
MockRxAndroidBle
class to mock bluetooth devices, I am unable to make an added service show in the advertisement payload.Steps to reproduce actual result
RxBleDevice
with a name, mac address, rssi, and a service with a given UUIDRxBleClient
rxBleClient.scanDevices(UUID)
Actual result
no devices are found
Expected result
The device that was added to the mock RxBleClient is found. This works as expected if I call
rxBleClient.scanDevices()
with no UUID. So I believe the issue is the service I am adding is not being used in the advertisement payload, is there any way to accomplish this? Thanks you!The text was updated successfully, but these errors were encountered: