Socket
Book a DemoInstallSign in
Socket

react-native-phone-call

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package version was removed
This package version has been unpublished, mostly likely due to security reasons

react-native-phone-call

Initiate a phone call in React Native

unpublished
Source
npmnpm
Version
1.2.2
Version published
Weekly downloads
5.7K
7.24%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-phone-call

package version package downloads standard-readme compliant package license make a pull request

Initiate a phone call in React Native.

Background

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

Running on Android

Running on iOS simulator

When running on the iOS simulator, you will get a the URL is invalid error. This will work on an actual device. The iOS simulator does not have access to the dialer app..

Running on Android SDK 30+

Android SDK 30 introduced changes around how apps can query and interact with other apps. This means Linking.canOpenURL returns false for all links unless a <queries> element is added to AndroidManifest.xml. Adding the following intent to android/app/src/main/AndroidManifest.xml should resolve the issue:

<queries>
      <intent>
        <action android:name="android.intent.action.DIAL" />
      </intent>
</queries>

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.

Install

Install the package locally within you project folder with your package manager:

With npm:

npm install react-native-phone-call

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 prompted prior to the call 
  skipCanOpen: true // Skip the canOpenURL check
}

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)

API

For all configuration options, please see the API docs.

Contributing

Got an idea for a new feature? Found a bug? Contributions are welcome! Please open up an issue or make a pull request.

License

MIT © Tiaan du Plessis

Keywords

react

FAQs

Package last updated on 24 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts