# react-native-call-detector

> React Native Call Detector

Latest version **0.2.0** (published 2017-06-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-call-detector
pnpm add react-native-call-detector
yarn add react-native-call-detector
bun add react-native-call-detector
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2017-06-26 |
| First published | 2017-05-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Guangcheng Wei |
| Maintainers | twksos |
| Keywords | react, native, react-native, call, detector, phone |

## Links

- npm: https://www.npmjs.com/package/react-native-call-detector
- Repository: https://github.com/liaoyuan-io/react-native-call-detector
- Homepage: https://github.com/liaoyuan-io/react-native-call-detector#readme
- Issues: https://github.com/liaoyuan-io/react-native-call-detector/issues
- npm.io page: https://npm.io/package/react-native-call-detector

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2017-06-26
- 0.1.0 — 2017-05-08

## README

#React Native Call Detector

This package is designed to detect whether there is a phone call in background while the app is in foreground.

```
import CallDetector from 'react-native-call-detector';

export class Example extends Component {
    componentWillMount() {
        this.callDetector = new CallDetector('call detector name', (event) => {
            {
                "Connected"   : ()=>{
                    console.log("Connected");
                },
                "Dialing"     : ()=>{
                    console.log("Dialing");
                },
                "Disconnected": ()=>{
                    console.log("Disconnected");
                },
                "Incoming"    : ()=>{
                    console.log("Incoming");
                }
            }[event]();
        });
    }

    componentWillUnmount() {
        this.callDetector && this.callDetector.dispose();
    }
}
```

---
_Source: https://npm.io/package/react-native-call-detector · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
