Luis Quiroga
Luis Quiroga

Reputation: 768

Phone call with react-native hiding the phone number I want to call

I'm using React-Native. The think is that I want the "operator" be able to call any "user" but I want to keep the user phone number private because of privacy reasons.

I know how to hide the number in the app with a button by only showing the phone icon (embedding the number), but when operator press the button it moves to the phone app (iOS or Android native apps) to make the call the number is there so the operator in that moment is able to read and copy the phone number.

I guess this is probably how iOS or Android phone apps work, so how can I work around these issue?

I know I can use react-native-immediate-phone-call but at the end is the same issue.

Any solution is welcome.

I'm following the next example: Guide

Upvotes: 1

Views: 2610

Answers (1)

YanouHD
YanouHD

Reputation: 1121

You can't do otherwise. That's how iOS and Android are made, 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).

It is a security standard.

Upvotes: 1

Related Questions