React Native EXPO

0

How do I use this in my button?

Scheme: tel Open phone app, eg: tel: +123456789 link

I tried:

<TouchableOpacity
 style={styles.button}
 onPress = {() =>  Linking.openURL('tel:95588877')}>
    <Icon name="phone" size={30} color="#ca8a2d"  />
    <Text style={styles.legenda}>Ligar</Text>
</TouchableOpacity>

But on my Android phone I get this error:

Attempt to invoke virtual method 'boolean java.lang.String.endsWith (java.lang.String)' on a null object reference ..

link

Ios does not work!

    
asked by anonymous 06.05.2018 / 18:11

0 answers