Skip to content

Conversation

@MnlPhlp
Copy link

@MnlPhlp MnlPhlp commented Oct 21, 2025

I want to support multiple characteristics with the same UUID in different services in tauri-plugin-blec.
In order to support this for subscribes, the ValueNotification has to specifiy what service caused it.
I added the values for all the integrations except Android, because I don't really know how to work with the jni code.

I can look at the android version, but I would prefer if someone with more experience in this area could do that.

The problem is I need a new release of this library with the added fields in order to release my crate with the new dependency.
If i checked correctly, there is no way to publish to crates.io with my github fork as dependency

let uuid = find_characteristic_by_id(&services, id)?.uuid;
Some(ValueNotification { uuid, value })
let info = find_characteristic_by_id(&services, id.clone())?;
let service = services.iter().find(|(_, s)| s.info.id == id.service())?.0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than looping through services a second time, how about making find_characteristic_by_id return the ServiceInfo as well as the characteristic?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it to return a tuple with characteristic and service info.

@qwandor qwandor merged commit 6e5120e into deviceplug:dev Nov 4, 2025
5 checks passed
@MnlPhlp
Copy link
Author

MnlPhlp commented Dec 3, 2025

Are there any plans on when you will do the next release?
Sadly I can't do a new release of the tauri plugin while depending on the git branch.
Cargo requires a published version for all dependencies to publish my crate.

Or do you know any other way I could publish an update?

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

Successfully merging this pull request may close these issues.

2 participants