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

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#>

Related

How can I control push notification ON/OFF according to conditions? in React Native

I am making a push notification feature using reactnative push notification.
If I create a channel according to the reactnative push notification official statement, I can control it only when I enter the notification category in the application information of the application.
Can I use the reactnative push notifictaion library to control when I create a component within the app like Youtubemusic (below Image) and implement the push setting ON OFF control function? It doesn't seem to be in the official documentation.
I'm trying to implement this feature within the app, but I'm curious about how it's implemented in practice!
i'm not using local notification just remote
Basically, you have 2 way to achieve this: on backend side or on frontend side.
Backend
Send to backend current state of toggle settings inside your app. When backend want to send push to client, it is internally checks state of this toggle and make a decision send or not.
Frontend
All your push notifications must be send as data only and with high priority (contentAvailable: true, priority: 'high').
After that, only mobile app will control showing of push notifications, because data only push not display anything, just trigger mobile app about new message.
So, when your frontend app receive new push message, it check current user settings and make decision display it or not.

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)

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 extract parameter from Branch.io deep link url getting via push notification from Locality's. in React native

I am using Branch.IO to generate deep links. Now the normal flow works perfectly. Opens the application on tapping the link from the mobile browser.
The problem is when I put the deep link URL in the payload of notification and tap on the notification. I will get deep link Url but what is the best way to redirect on particular screen based on url parameter in react native?. i am not getting parameter
i am sending notification via locality's
Thanks in advance.
You can send custom data in the payload of the notification, may be a notification type and use that type to show the desired screen on notification tap.
For how to send Custom data in payload please check:
Apple Push Notification with Sending Custom Data

How do LINE and Viber display incoming call screens on WP?

I couldn't manage to find that piece of API which allows apps to alert the user with a custom screen, like what can be seen on an incoming (network) phone call over services like LINE or Viber, which even works ubder the lock screen.
Do they need similar registrations as push notifications?
What those apps are using is probably the VoIP APIs that are available. There is a full guide on how to implement such functionality here (including that incoming call screen): http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206983(v=vs.105).aspx
There is also a downloadable sample app available here: http://code.msdn.microsoft.com/wpapps/ChatterBox-VoIP-sample-app-b1e63b8b