Skip to content

A component to get call events fired back to your application.

License

Notifications You must be signed in to change notification settings

Bounteous-Inc/react-native-call-events

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-call-events

A component to get call events fired back to your application.

Currently this works only on Android.

Installation

yarn add react-native-call-events

Usage

Initialize the listeners with

import RNCallEvent from 'react-native-call-events'
RNCallEvent.init(false, false);

Init Parameters:

Parameter Description
returnOnCall Return to the calling app when a phone call begins. Note: this currently does not work with a call that goes to voicemail.
returnOnEnd Return to the calling app when a phone call ends

Events

###callStatusUpdate Will be fired with every call status change

    DeviceEventEmitter.addListener('callStatusUpdate', event => {
      console.log(`Event: ${event}`);
    });

Event Object Properties

Property Description
type A string that will be one of: CALL_STATE_OFFHOOK, CALL_STATE_RINGING, or CALL_STATE_END
phonenumber Will be populated on both offhook and ringing, but most devices do not populate on end

About

A component to get call events fired back to your application.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published