-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Android: Fatal signal 6 (SIGABRT) when getting the adapter #287
Comments
How are you building the android system? Did you build and bring in the droidplug classes from btleplug too? I'm wondering if this is a missing java symbol or something. |
I have followed steps in this blog. I created the app with same steps and then added the btleplug too. |
That blog has nothing to do with our project. Did you follow the extra steps outlined in our README? https://github.com/deviceplug/btleplug#android |
First, I started implementation as per README only. Faced same error for adapter so I googled some more and found devgenius blog. Let me try again as per README and I'll share the issue with code. |
Will you be able to list out set up steps in detail. Not sure how to build java portion of btleplug or jni-util-rs and how to connect it with my android app from the steps. I am new with rust and android both. For local set up I need to checkout both this and add to my project? |
Added the base code here. You might look into it provide some pointers. |
@qdot Followed these steps as per README and yet facing same issue. Pushed latest changes here https://github.com/Avani-A-S/bledemoapp. Steps followed:
|
I was getting I don't think |
Your issue resolved with |
It's a little outdated but see the code snippet here #8 (comment). It doesn't really matter where you put it, it just needs to be called before you do anything with btleplug. So putting it in an init function that you call manually like this is fine too. |
Yes. I tried that but facing error Facing the same issue with flutter as well so reported trobanga/flutter_btleplug#4. Not sure if this is the issue related to versions of libraries I am using - |
jni should be 0.19.0 |
@Oppzippy Thanks a lot! It finally worked with jni 0.19.0 and by adding btleplug::platform::init. |
Describe the bug
For Android platform, getting this error while getting the adapter.
Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 16382 (rustapplication), pid 16382 (rustapplication)
Taking the code reference from https://docs.rs/btleplug/0.10.4/btleplug/. This work fine on windows. When trying to cross compile for android, creating SIGABRT error.
Provided more details https://users.rust-lang.org/t/btleplug-on-android-app-issue/86339.
The text was updated successfully, but these errors were encountered: