Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Initiate immediate phone call with react native on expo

I'm trying to initiate an immediate phone call without the middleware dialog. I've used the Linking.openUrl() but it didn't work.

react-native-immediate-phone-call does that but it requires linking which isn't possible with expo. What can I do?

like image 772
Soragim Avatar asked Sep 18 '25 09:09

Soragim


2 Answers

You can use Linking. Import that by import * as Linking from "expo-linking".

Then use openURL function where you use as argument tel instead http.

Similar like:

Linking.openURL('tel:+12 XXX XXX XXX') where X is any digit.

Hope that was helpful ;)

like image 161
ArchAngel Avatar answered Sep 21 '25 12:09

ArchAngel


import * as Linking from "expo-linking";

Then you can directly link to phone call like

 Linking.openURL(`tel:${phoneNumber}`);

There are other schemes also mentioned in the docs like mailto etc

https://docs.expo.io/guides/linking/?redirected

like image 31
Sehrish Waheed Avatar answered Sep 21 '25 11:09

Sehrish Waheed