Can i use expo-linking for a phone call - react-native

I'm developing a mobile application using React Native Expo and I would like to be able to make a phone call with expo-linking and the list of my contacts with expo-contact if possible. Thanks
edit: i managed to do what i wanted

Hope it helps :)
import * as Linking from "expo-linking";
Linking.openURL('phone:+1786256252'); // phone
Linking.openURL('sms:+1786256252'); // sms
Linking.openURL('https://wa.me/+1786256252'); // whatsapp
Linking.openURL('https://t.me:+1786256252'); // telegram

Related

React native share:-how to use share functionality with different message for different app

I have a requirement in share functionality in which i want to share different different messages for facebook twitter and other apps. But in react native share i have only one message variable in which we pass the data. Can anyone help me about how to pass different message in different apps. Like how i can identify that facebook is selected or twitter is selecr or other app is selected and then send specific message to. That app in react native.
Please help me i am new to react native. It will be a great help.

React Native Linking simultaneously for mail AND sms

Is it possible to Linking.openUrl() for both mail and sms ? I'd like my user to choose between those app and prefill information in the body.
Linking.openURL('mailto:support#example.com?subject=SendMail&body=Description')
does suggest mail apps
Linking.openURL('sms:number?body=Description')
does suggest sms apps
Is there a way to have both app proposed to the user while being prefilled with Description ?
Sounds like you are looking for "Share" functionality.
See the official React Native Share Docs, or this popular third party library.
FOR mail
Linking.openURL('mailto:example#example.com?subject=SendMail&body=Description')
FOR sms
Linking.openURL('sms:number?body=yourMessage?subject=SendMail&body=Description')
If this information not enough; you should be 3.part package like;
https://github.com/flexible-agency/react-native-email-link
or
React Native Share.

How to get System ringtones/sounds

How can i get the list of system ringtones or storage ringtones/sounds in react native e.g ring tones, notification tones, so that i can give users choice to set them as notification tone?
I've searched some libraries but it didn't work
You can use this module if you are using Android. react-native-ringtone-manager
But it only use Android not ios
Usage
import RingtoneManager from 'react-native-ringtone-manager';
...
getRings() {
this.rings = RingtoneManager.getRingtones(RingtoneManager.TYPE_ALL);
if(this.rings != null) {this.rings = this.rings.map((data,index) =>{<Text>{data.title}</Text>})};
}
For iOS I tried react-native-notification-sounds npm pacakge .. But it gives all the sounds from the sound folder .. So you get a long list of sounds and no way to filter which is notification or ringtone sound.. Working on this

Is there a way to send a phone call to a phone number without start the dialer Voice application using react native?

We are making an electronic device with a SIM Card included in it. Then, when we make a call to a certain phone number associated with this SimCard, that triggers some actions in the device.
Now I want to develop a react native phone application to send the phone call request "in the background" when a button is tapped in this app.
Are there any ways to do this? I don't want to run the installed phone app/dialer app, because we do not intend to talk someone, but only trigger an event.
I've been looking for a solution but the react-native modules working with phone calls (example: react-native-communications) are not very clear concerning this.
If a solution using react native weren't available I accept other ideas about how to implement this requirement (angular, or using an intermediate server with node/PHP/Java/etc..)
Thank you.

How to read SMS messages in react native?

I have a react native app that uses SMS verification and I want to have a listener for incoming SMSs to read the code automatically.
I've used react-native-android-sms-listener but it doesn't work for Android 8 and above. Can anyone help?
you can use react-native-sms-retriever instead it supports for all versions
or else you can use react-native-get-sms-android to get all the user message in JSON and extract the data out of it.