omi icon indicating copy to clipboard operation
omi copied to clipboard

React Native SDK is not working properly

Open gabimoncha opened this issue 7 months ago • 7 comments

Describe the bug

  • @omiai/omi-react-native SDK is not working for Expo 53
  • Following the Docs also throws new NativeEventEmitter() requires a non-null argument

To Reproduce

  • Implement the example in an Expo 53 bare app and try and connect to Omi

Current behavior

  • @omiai/omi-react-native SDK is using an outdated version of react-native-ble-plx
  • Example app is using Expo 50 while the current version of Expo is 53

When trying to patch the SDK these are the additional issues

  • manger.onStateChange doesn't get called and app cannot get Bluetooth State
  • App is showing all bluetooth devices instead of OMI devices

Expected behavior

  • Up to date React Native SDK
  • Working implementation of Bluetooth Manager

gabimoncha avatar May 09 '25 10:05 gabimoncha

@gabimoncha Struggled with this quite a bit myself but using the expo-50 sdk I was able to get this working https://github.com/AnkushMalaker/friend-lite/tree/main/friend-lite Leaving it here for reference until it gets solved upstream. This works end to end and I can get the states. I would like an upgraded react-native package too!

AnkushMalaker avatar May 12 '25 07:05 AnkushMalaker

Thank you @AnkushMalaker. I've manged to make it work on expo 53, thought some changes had to be done

gabimoncha avatar May 12 '25 11:05 gabimoncha

Nice, so can this issue be closed? @gabimoncha

AnkushMalaker avatar May 12 '25 15:05 AnkushMalaker

Not really, change to the SDK still needs to be done in order to make it compatible with expo 53

gabimoncha avatar May 12 '25 20:05 gabimoncha

Thank you @AnkushMalaker. I've manged to make it work on expo 53, thought some changes had to be done

Pls feel free to open a PR with the changes ;)

mdmohsin7 avatar May 12 '25 22:05 mdmohsin7

@mdmohsin7 check this out #2374

AnkushMalaker avatar May 15 '25 06:05 AnkushMalaker

To prevent duplicate work will wait for this PR to get resolved. I do have some optimization to add since testing and working with the SDK

gabimoncha avatar May 16 '25 09:05 gabimoncha