BakrID / rnphonecallrecorder

React-native library for recording incoming and outgoing calls (now only for android)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-phone-call-recorder

Getting started

$ npm install react-native-phone-call-recorder --save

Mostly automatic installation

$ react-native link react-native-phone-call-recorder

Manual installation

iOS (not implemented now)

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-phone-call-recorder and add RNPhoneCallRecorder.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNPhoneCallRecorder.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNPhoneCallRecorderPackage; to the imports at the top of the file
  • Add new RNPhoneCallRecorderPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-phone-call-recorder'
    project(':react-native-phone-call-recorder').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-phone-call-recorder/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-phone-call-recorder')
    

Usage

import RNPhoneCallRecorder from 'react-native-phone-call-recorder';

// TODO: What to do with the module?
RNPhoneCallRecorder;

About

React-native library for recording incoming and outgoing calls (now only for android)


Languages

Language:Java 94.3%Language:Ruby 3.3%Language:Objective-C 1.8%Language:JavaScript 0.6%