react-native-check-phone-call-status
Getting started
$ npm install react-native-check-phone-call-status --save
Mostly automatic installation
$ react-native link react-native-check-phone-call-status
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries➜Add Files to [your project's name] - Go to
node_modules➜react-native-check-phone-call-statusand addRNCheckPhoneCallStatus.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNCheckPhoneCallStatus.ato your project'sBuild Phases➜Link Binary With Libraries - Run your project (
Cmd+R)<
Usage
Will return 'PHONE_ON' when phone is in use, and 'PHONE_OFF' when not in use.
import RNCheckPhoneCallStatus from 'react-native-check-phone-call-status';
RNCheckPhoneCallStatus.get((error, status) => {
console.log('Phone status is:', status);
});
Would be great to have this for Android as well. Feel free to make a PR!