Skip to content

Conversation

@tternes
Copy link

@tternes tternes commented Dec 3, 2025

I'm in the process of integrating this library into an Android application and am hoping to contribute a handful of improvements to help address some of the challenges folks face when getting this to work.

This first change is to push initialization of the jni-utils-rs crate into this library directly. This is a critical step to getting callbacks from the Java code to wake up Rust futures, but is not consistently shown in the examples I've tracked down. Some examples establish peer dependencies on btleplug and jni-utils-rs, but those need to be carefully version-matched, causing fragility (and unfortunately in my testing, silent bugs that are hard to run down).

Since btleplug directly depends on this crate, the initialization here made sense. I don't love the unwrap() and am very open to ideas about how to better surface these types of early initialization errors to the application.

@qwandor qwandor added the android Issues related to the android core label Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

android Issues related to the android core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants