react native android app crash after paired with ble device

313 Views Asked by At

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

1

There are 1 best solutions below

0
tommyt4a On BEST ANSWER

Finally, I solve the problem by adding some value to android:configChanges at androidManifest