dotintent / react-native-ble-plx

React Native BLE library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Android setup

chris-goodchild opened this issue · comments

Prerequisites

  • I checked the documentation and FAQ without finding a solution
  • I checked to make sure that this issue has not already been filed
  • I'm sure that question is related to the library itself and not Bluetooth Low Energy or Classic in general. If that so, please post your question on StackOverflow.
  • I'm running the latest version

Question

Hi, I have read the docs and seen a related issue specific to Expo but this is running a raw RN project. Is there a need to manually import and add the BlePlxPackage in Android in MainApplication.java? I installed the package and checked that we have all of the necessary config in our AndroidManifest.xml but when running the app on Android we are seeing the error Cannot read property 'createClient' of null from instantiating BleManager.

I have checked your example project which contains no such manual installation setup, but I'm wondering why the module cannot be found unless we're missing some steps.

I tried with the latest RN template and I don't see any problems - you can check all the changes I made to run the scan: dominik-czupryna-withintent/i1202@883bab5
Maybe something is cached?

My bad, we have a custom setup and needed to manually register the module. Thanks.