0

I am using react-native-ble-manager to connect ble device.

After I connected with my app, I try to paired the ble device and my phone with BleManager.createBond and return a success message.

However, after a few second, my app crash without any error from terminal.

Here is the error from Sentry

RuntimeException android.app.ActivityThread in performLaunchActivity.

And the android app will also crash when turn on/off bluetooth and unpair ble device after paired a ble device.

Anyone has any idea to solve this question?

I try to modify super.onCreate(savedInstanceState) to super.onCreate(null) in mainActivity file but it only help to recover my app after crash and more problems are occured.

I also try to pair before connection but it is no help

tommyt4a
  • 1
  • 1
  • Have you tried just connecting instead of bonding? Bonding is not needed if your BLE services do not require encryption – Michael Kotzjan Aug 15 '23 at 09:49
  • I need to remote the camera and control music player, so i need to pair the ble device. Finally, I solve the problem by adding some value to android:configChanges at androidManifest – tommyt4a Aug 31 '23 at 04:29

0 Answers0