Table of Contents
This is a small module that allows you to initiate a phone call in React Native.
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 with npm
$ npm install --save react-native-phone-call
Install with yarn
$ yarn add react-native-phone-call
To use the module, call the function with an object containing the number to call as a argument.
const args =number: '9093900003' // String value with the number to callprompt: false // Optional boolean property. Determines if the user should be prompt prior to the call
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
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.
All Contributions are welcome! Please open up an issue if you would like to help out. 😄
Licensed under the MIT License.