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

awaitClose{} not triggering issue when stopAdvertise() is called? #162

Open
shiyu-sz opened this issue Oct 4, 2024 · 4 comments
Open

awaitClose{} not triggering issue when stopAdvertise() is called? #162

shiyu-sz opened this issue Oct 4, 2024 · 4 comments

Comments

@shiyu-sz
Copy link

shiyu-sz commented Oct 4, 2024

I implemented the ble peripheral device function according to the method in ServerViewModel.kt, but I found that it can broadcast after calling advertise(), but calling stopAdvertise() cannot stop broadcasting. I thought it was a problem with my code, and then I ran the "Blinky Server" application, and I found that this application could not stop broadcasting either. After debugging, I found that awaitClose was not called.

image

@philips77
Copy link
Member

Hi, could you try the new version of the library from version/2.0 branch?
It's not source-compatible with the one on main, but I hope this new version has more intuitive API. Client and advertiser should work. The new version isn't available yet on Maven Central, so you'd have to add it from source.

@shiyu-sz
Copy link
Author

The program of version/2.0 branch cannot run normally. When selecting "Advertiser"->"Start Advertiser", no broadcast is found and the interface automatically stops broadcasting. When selecting "Scanner", the application will crash.

@philips77
Copy link
Member

Perhaps you run the "mock" flavor. Change to "native". I'm still working on the mock client.

@philips77
Copy link
Member

Also, have a look at #167.

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