Socket
Book a DemoInstallSign in
Socket

react-native-manipulate-call-log

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-manipulate-call-log

Android's Native call logs manipulator in React Native

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

React Native Forward Calls

Android's Native call logs manipulator in React Native

Installation

npm install react-native-manipulate-call-log --save

npm page - https://www.npmjs.com/package/react-native-manipulate-call-log

Add permissions

  • In AndroidManifest.xml add:

<uses-permission android:name="android.permission.WRITE_CALL_LOG"/>

Project setup and initialization auto

react-native link

Project setup and initialization manually

  • In android/settings.gradle
...
include ':react-native-manipulate-call-log', ':app'
project(':react-native-manipulate-call-log').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-forward-calls/android')
  • In android/app/build.gradle
...
dependencies {
    /* YOUR DEPENDENCIES HERE */
    compile project(':react-native-manipulate-call-log') // <--- add this
}

  • Register Module (in MainApplication.java)
import com.himelbrand.calllogs.RNManipulateCallLogPackage;  // <--- import

public class MainActivity extends ReactActivity {
  ......

  @Override
  protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
          new RNManipulateCallLogPackage() // <--- Add this
      );
  }

  ......

}

Usage

Import

import CallLogs from 'react-native-manipulate-call-log'

Add call log at current time

Duration is given in seconds (second param)
CallLogs.addIncomingCallLog('123456789', 30)//adds an incoming call log, at:now from:123456789 duration:30sec
CallLogs.addOutgoingCallLog('123456789', 30)//adds an outgoing call log, at:now to:123456789 duration:30sec
CallLogs.addMissedCallLog('123456789')//adds an missed call log, at:now from:123456789

Add call log at specific time

Duration is given in seconds (second param)
Time of call is given in Milliseconds (third param)
CallLogs.addIncomingCallLogAt('123456789', 30, 1493752942000)//adds an incoming call log, at:05/02/2017-22:22:22 from:123456789 duration:30sec
CallLogs.addOutgoingCallLogAt('123456789', 30, 1493752942000)//adds an outgoing call log, at:now to:123456789 duration:30sec
CallLogs.addMissedCallLogAt('123456789', 1493752942000)//adds an missed call log, at:05/02/2017-22:22:22 from:123456789

Keywords

React

FAQs

Package last updated on 09 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.