Quantcast
Channel: How to make phone call in React Native? - Stack Overflow
Viewing all articles
Browse latest Browse all 14

Answer by Sourabh Gera for How to make phone call in React Native?

$
0
0
import { View,Linking,Text, Image,Platform,TouchableOpacity } from 'react-native'; const onPressMobileNumberClick = (number) => {        let phoneNumber = '';        if (Platform.OS === 'android') {          phoneNumber = `tel:${number}`;        } else {          phoneNumber = `telprompt:${number}`;        }        Linking.openURL(phoneNumber);     }<TouchableOpacity        onPress={() => { onPressMobileNumberClick("9211886204") }} ><Text style={{ textDecorationLine: 'underline', textAlign: 'center', }>               {"9211886204"}</Text></TouchableOpacity>

Viewing all articles
Browse latest Browse all 14

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>