Rithiksha
Rithiksha

Reputation: 11

Phone number masking in react native

I am working on react native where a driver calls to the customer from the app. But the dialed number is visible in the dial pad which is not good for customer privacy. So is there option in react native for masking the number? Currently i use this for calling

Linking.openURL(`tel:${this.props.element.Phone}`)

Upvotes: 1

Views: 1338

Answers (1)

Nooruddin Lakhani
Nooruddin Lakhani

Reputation: 6967

You can't do otherwise. You cannot make a call without the user consent (for example iOS shows an alert containing the phone number, and Android redirects the user to the phone app with the number prefilled).

For that you can use react-native-immediate-phone-call

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

Upvotes: 1

Related Questions