react-native-instantpay-call-auth
v1.1.2
Published
React Native module for Detecting calls with event listener. Supports only for Android.
Downloads
10
Readme
react-native-instantpay-call-auth
React Native module for Detecting Call with event listener. Supports only for Android.
TOC
Installation
npm install react-native-instantpay-call-auth
Manual installation
Android
- Open up
android/app/src/main/java/[...]/MainApplication.java
- Add
import com.instantpaycallauth.InstantpayCallAuthPackage;
to the imports at the top of the file - Add
new InstantpayCallAuthPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-instantpay-call-auth' project(':react-native-instantpay-call-auth').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-instantpay-call-auth/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-instantpay-call-auth')
Usage
import RNCallAuth from 'react-native-instantpay-call-auth';
// ...
let data = await RNCallAuth.getStatus();
Event Listener Methods
//Add Listener
RNBluetooth.addEventListener("change", handleConnection);
//Remove Listener
RNBluetooth.removeEventListener("change", handleConnection);
handleConnection = (resp) => {
console.log('response:', resp);
}
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with Instantpay