This is a comprehensive example application demonstrating how to use the Omi SDK for React Native to connect to and interact with Omi devices.
- Scan for nearby Omi devices
- Connect to and disconnect from devices
- Get audio codec information
- Monitor battery levels
- Stream audio data from the device
- Real-time audio transcription using Deepgram API
- React Native development environment with Expo
- An Omi device for testing
- (Optional) Deepgram API key for transcription features
- Clone the repository
- Install dependencies:
cd sdks/react-native/example
npm install
# or
yarn installThis example uses Expo, which simplifies the development process.
npm start
# or
yarn startnpm run ios
# or
yarn iosnpm run android
# or
yarn androidThe app will automatically request Bluetooth permissions when needed. If permissions are denied, you'll see a banner with instructions to enable them.
- Tap "Scan for Devices" to begin searching for nearby Omi devices
- The scan will automatically stop after 30 seconds, or you can tap "Stop Scan" to end it manually
- Found devices will appear in the list with their name and signal strength (RSSI)
- Tap "Connect" next to the device you want to connect to
- Once connected, additional device functions will become available
- To disconnect, tap "Disconnect"
Once connected, you can:
- Get Audio Codec: Retrieves the audio codec used by the device
- Get Battery Level: Shows the current battery percentage
- Start/Stop Audio Listener: Begins/ends streaming audio data from the device
The app includes integration with Deepgram for real-time audio transcription:
- Enable the "Enable Transcription" checkbox
- Enter your Deepgram API key
- Start the audio listener
- Tap "Start Transcription" to begin converting audio to text
- Transcription results will appear at the bottom of the screen
-
Device not found during scanning
- Ensure Bluetooth is enabled on your device
- Check that you have granted the necessary permissions
- Make sure the Omi device is powered on and in range
-
Connection fails
- Try restarting the Omi device
- Ensure the device is not connected to another application
- Check the battery level of the Omi device
-
Audio data not received
- Verify that the device supports the audio service
- Check that the device is properly connected
-
Transcription not working
- Verify your Deepgram API key is correct
- Ensure you have an active internet connection
- Check that audio is being received from the device
The example app demonstrates:
- Proper lifecycle management of BLE connections
- Handling permissions on both iOS and Android
- Efficient audio data processing
- Integration with third-party services (Deepgram)
- Responsive UI for different device states
MIT