Giter VIP home page Giter VIP logo

react-native-immediate-phone-call's Introduction

react-native-immediate-phone-call

Initiate immediate phone call (without further user interaction) for React Native on iOS and Android. The difference with react-native-phone-call and react-native-communications is that with this library no additional user input is required for Android and the call starts instantly (Apple always asks confirmation since the last iOs updates...).

NOTICE:

  • for React Native < 0.47 use react-native-immediate-phone-call <1.x.x
  • for React Native > 0.47 use react-native-immediate-phone-call >=1.x.x

Setup

Fast and easy:

npm install react-native-immediate-phone-call --save
react-native link react-native-immediate-phone-call

Or manual: add the latest version as dependeny to your package.json.

{
  "name": "YourProject",
  ...
  },
  "dependencies": {
    ...
    "react-native-immediate-phone-call": "0.1.0",
    ...
  }

iOS

  • Add RNImmediatePhoneCall.xcoderproj into your project in the Libraries folder.
  • Add the .a file on the General tab of your target under Linked Frameworks And Libraries
  • Add the .a file on the Build Phases tab of your target under Link Binary With Libraries

Android

  • In the AndroidManifest.xml file of your android studio project add:
    <uses-permission android:name="android.permission.CALL_PHONE" />
    
  • In the settings.gradle
      include ':react-native-immediate-phone-call', ':app'
      project(':react-native-immediate-phone-call').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-immediate-phone-call/android')
    
  • In the build.gradle
      compile project(':react-native-immediate-phone-call')
    
  • In MainApplication.java
      import com.github.wumke.RNImmediatePhoneCall.RNImmediatePhoneCallPackage;
      ...
      @Override
      protected List<ReactPackage> getPackages() {
        return Arrays.<ReactPackage>asList(
          ...
          new RNImmediatePhoneCallPackage(),
          ...
        );
      }
      ...
    

Usage

import RNImmediatePhoneCall from 'react-native-immediate-phone-call';
...
RNImmediatePhoneCall.immediatePhoneCall('0123456789');
...

Versioning

This project uses semantic versioning: MAJOR.MINOR.PATCH. This means that releases within the same MAJOR version are always backwards compatible. For more info see semver.org.

react-native-immediate-phone-call's People

Contributors

zapps avatar wumke avatar tiaanduplessis avatar

Watchers

James Cloos avatar NICK avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.