React Native Incall Manager

screenshot of React Native Incall Manager

Handling media-routes/sensors/events during a audio/video chat on React Native

Overview

The React Native InCall Manager module is designed to handle actions and events during a phone call (audio/video) on React Native. It manages device events, route audio to proper devices, toggle speaker or microphone on/off, and play ringtones. This module simplifies the handling of various requirements during a call, such as answering, hanging up, and mute functionalities.

Features

  • Device event management: Handles events like wired-headset state, proximity sensors, etc.
  • Automatic audio routing: Routes audio to appropriate devices based on events and platform APIs.
  • Toggle functionalities: Allows toggling speaker or microphone on/off, flashlight on/off, etc.

Android

  • After installation, link Android using react-native link react-native-incall-manager.
  • Ensure necessary permissions like android.permission.BLUETOOTH are added.
  • Add compile "com.android.support:support-v4:$YOUR_VERSION" to $YOUR_PROJECT/android/app/build.gradle dependencies.
  • Manually link if needed as described in the documentation.

iOS

  • Using CocoaPods, update the Podfile with pod 'ReactNativeIncallManager', :path => '../node_modules/react-native-incall-manager'.
  • Manually link by dragging node_modules/react-native-incall-manager/ios/RNInCallManager.xcodeproj into your Xcode project and linking binary with libraries.

Summary

The React Native InCall Manager module simplifies handling actions/events during phone calls in a React Native application. By managing device events, audio routing, and toggle functionalities, it provides a convenient solution for implementing telecommunication features. Contributions to improve main thread operations, resolve conflicts, and enhance functionality are welcomed.