ilya-bmi / react-native-check-phone-call-status

Check if user is currently on the phone - iOS only for now

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-check-phone-call-status

Whis version use CallKit instead of CTCallCenter. It works on IOS 13.

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

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-check-phone-call-status and add RNCheckPhoneCallStatus.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNCheckPhoneCallStatus.a to your project's Build PhasesLink Binary With Libraries
  4. 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);
});

About

Check if user is currently on the phone - iOS only for now


Languages

Language:Objective-C 48.7%Language:Ruby 46.7%Language:JavaScript 4.6%