A React Native package to detect incoming, outgoing, and active call states on iOS and Android.
React Native Call Detection is a library that allows React Native apps to detect and respond to phone call events such as incoming, outgoing, and active calls. It solves the problem of apps needing to adapt their behavior—like pausing audio or logging call activities—when a user is engaged in a phone call, providing cross-platform support for iOS and Android with platform-specific call states.
React Native developers building apps that require telephony integration, such as audio players, call loggers, or applications that need to pause functionality during phone calls.
Developers choose this package because it offers a straightforward, well-documented API for call state detection across both major mobile platforms, handles Android permissions automatically, and includes memory management to prevent leaks, reducing the complexity of native telephony integration.
react-native package to detect call states
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Detects multiple call states on both iOS and Android, including incoming, disconnected, dialing, and connected for iOS, and offhook, incoming, disconnected, missed for Android, as detailed in the README usage examples.
Retrieves incoming call phone numbers on Android with automatic permission handling and customizable request messages, explicitly mentioned in the README for the 'Incoming' event.
Automatically requests READ_PHONE_STATE permission on Android and allows developers to set custom permission messages, simplifying compliance and user explanation, as shown in the constructor options.
Includes a dispose method to clean up listeners, with the README emphasizing its importance to avoid memory leakages in long-running apps.
Does not retrieve incoming call numbers on iOS, limiting caller ID features to Android only, which the README implicitly admits by only mentioning number retrieval for Android.
Event names and available states differ between iOS and Android (e.g., 'Connected' and 'Dialing' only on iOS, 'Offhook' and 'Missed' only on Android), requiring extra logic for cross-platform apps.
Running the example project involves multiple steps like installing external tools (node, watchman, Xcode) and device configuration, which can be cumbersome for quick testing, as outlined in the README's 'How to run an example' section.
Focuses solely on call state detection without built-in support for call handling, blocking, or other advanced operations, making it less suitable for full telephony apps beyond basic monitoring.