npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-forward-calls

v1.1.0

Published

Android's Native call forwarding in React Native

Downloads

23

Readme

React Native Forward Calls

Native call forwarding in React Native (no support for IOS at the moment) Welcome! this project is not yet complete, for all ready parts see documentation below. (docs are not complete, feel free to improve them)

Still missing

  • this project have no support for IOS what so ever, since I don't own a mac
  • custom forwards (the MMI code sent as a parameter to the function)
  • some of the MMI codes for Android if you would like to contribute to this project or suggest more future features you're welcome to so via an issue or pull request.

IOS support

right now this package does not support IOS, so any one that wants to help and contribute the IOS support is more than welcome to do so after contacting me to verify (so you won't do the work for nothing in case it's already under construction)

Realease notes

**version 1.1.0**
added support for custom MMI codes call forwards and cancellation 

Installation

npm install react-native-forward-calls --save

npm page - https://www.npmjs.com/package/react-native-forward-calls

Add permissions

  • In AndroidManifest.xml add:

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

Project setup and initialization auto

react-native link

Project setup and initialization manually

  • In android/settings.gradle
...
include ':react-native-forward-calls', ':app'
project(':react-native-forward-calls').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-forward-calls') // <--- add this
}
  • Register Module (in MainApplication.java)
import com.himelbrand.forwardcalls.RNForwardCallsPackage;  // <--- import

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

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

  ......

}

Usage

Import

import ForwardCalls from 'react-native-forward-calls'

Forward calls

ForwardCalls.unconditionalForwarding('123456789')//Forward all calls unconditionally to the number 123456789
ForwardCalls.forwardCallsIfBusy('123456789')//Forward calls if busy to the number 123456789
ForwardCalls.forwardCallsIfNotAnswered('123456789')//Forward calls if not answered to the number 123456789
ForwardCalls.forwardCallsIfOutOfReach('123456789')//Forward calls if out of reach to the number 123456789
ForwardCalls.allConditionalForwarding('123456789')//All conditional forwarding activated to the number 123456789
ForwardCalls.customCodeForwarding('*72','123456789')//All calls forwarding activated to the number 123456789, north america code

Cancel call forwarding

ForwardCalls.cancelUnconditional()
ForwardCalls.cancelIfBusy()
ForwardCalls.cancelIfNotAnswered()
ForwardCalls.cancelIfOutOfReach()
ForwardCalls.cancelAllConditional()
ForwardCalls.cancelCustomForward('*73') //String parameter of cancellation code