I'm trying to make a phone call with react-native and have it automatically be in the background (stay in my app), is it possible to achieve this? also When pressing the button to make the call a prompt pops up saying "call (###)###-####" is there a way around the prompt to make a direct call? thank you.
CodePudding user response:
You have to run: npm i react-native-phone-call
it's ultimately just a wrapper for:
import {Linking} from 'react-native'
Linking.openURL(`tel:${phoneNumber}`)
<Text onPress={()=>{Linking.openURL('tel:${phoneNumber}`);} }>${phoneNumber}`</Text>
Check this link: https://www.npmjs.com/package/react-native-phone-call
CodePudding user response:
I think react-native-callkeep might be more what you're looking for, as it allows you to make calls without leaving your app.
https://github.com/react-native-webrtc/react-native-callkeep