React Native Linking simultaneously for mail AND sms - react-native

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.

Related

How to make whatsapp perform actions on behalf of react-native application?

I am trying to integrate whatsapp in my react-native app. So far the resources that I have found only tell how to send a message or open whatsapp via Linkurl from react-native application. But I want to take a step further and perform action from whatsapp. Imagine like you trigger the notification and you select the Yes and No and that performs the respective actions I want to make similar functionality but on whatsapp. After a user perform certain activity from the react-native application I want to send notification on whatsapp and without opening the react-native application the user should be able to perform action. Is there a way I can achieve this functionality.
React Native/JS do not have support to 'whatsapp://' scheme.
The following Schemes Only:
mailto; //For Mailing
tel; //For Telephone
sms; //For SMS
http / https; //For Hyperlinks
You can use this method to send WhatsApp message direct to a number.
https://wa.me/<phone#>

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.

What is Instagram deep link in React Native for iOS and Android

I need to open the Instagram Direct Message from React Native app and send a text to a selected contact after opening in Instagram.
I already found the way to open Whatsapp and send a message to selected contact using:
Linking.openURL('whatsapp://send?text='+text);
Also I found this for Instagram which is not working:
Linking.openURL('instagram://library?OpenInEditor=1&LocalIdentifier=${identifier}');
Does anyone know how to do that? (I know there are some sharing tools but I don't need to use them)

In-app messenger api with prepopulated text

Many apps used an in-app Facebook messenger api to share referral link directly to messenger. They also use prepopulated text with a link.
My question is fairly simple : How do they do it ?
I could not find any documentation about it, the closest thing I found is the send dialog api which doesn’t allow any prepopulated text.
Example (Lime app):
You need a Link not share, try this package or find something similar
https://www.npmjs.com/package/react-native-facebook-messenger

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.