Git Product home page Git Product logo

react-native-phone-call's Introduction

react-native-phone

Initiate a phone call in React Native

Table of Contents

Table of Contents
  • Introduction
  • Install
  • Usage
  • Limitations
  • Contribute
  • License
  • Introduction

    This is a small module that allows you to initiate a phone call in React Native.

    NOTE

    When running on the iOS simulator, you will get a the URL is invalid error. This will work on a actual device. The iOS simulator does not support phone call feature.

    Install

    Install with npm

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

    Install with yarn

    $ yarn add react-native-phone-call

    Usage

    To use the module, call the function with an object containing the number to call as a argument.

    import call from 'react-native-phone-call'
    
    const args = {
      number: '9093900003', // String value with the number to call
      prompt: false // Optional boolean property. Determines if the user should be prompt prior to the call 
    }
    
    call(args).catch(console.error)

    Example with phone and extension. Use commas to add time between pressing different digits. (ex. dial a number and wait to be connected and menu to start being read. Press a number for an extension. Even wait longer for another menus and press another number for another extension.)

    const args = {
      number: '9093900003,,,3,,,274', // Use commas to add time between digits.
      prompt: false
    }
    
    call(args).catch(console.error)

    Limitations

    This module only provides a simple wrapper around the Linking API and is thus limited in the functionality it can provide. If you are looking for additional functionality, such as being able to initiate a phone call without user confirmation, please use other packages like react-native-immediate-phone-call.

    Contributing

    All Contributions are welcome! Please open up an issue if you would like to help out. ๐Ÿ˜„

    License

    Licensed under the MIT License.

    Icon made by Madebyoliver from www.flaticon.com is licensed by CC 3.0 BY

    react-native-phone-call's People

    Contributors

    brownmagik352 avatar douglasjunior avatar greenkeeper[bot] avatar imgbotapp avatar plahteenlahti avatar renovate-bot avatar tiaanduplessis 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.