React-Native with Webhooks? - react-native

Is it possible to integrate React-Native with Webhooks?
Currently, I have a chatbot using React, Dialogflow and webhooks. I am intending to port over to React-Native. Hence, I like to find out if possible to use webhooks to integrate React-Native with Dialogflow?
When I google, I find tons of materials regarding React with Webhooks but none concerning React-Native with Webhooks.
In case not possible to integrate React-Native with Webhooks, how does one work around it then?
Thanks :)

Webhooks usually mean that a URL is called which triggers some kind of action on your server. In the client world you would use sockets.
So if you wish to communicate from server to client instead of vice versa you should either use sockets or native notifications, at least for iOS.
The app is only alive for a certain amount of time when not being used and then its terminated by OS on Apple products. Your socket will thus be shut down. Apple recommends to use native notifications to wake you app up in such cases.
This works espacially well for chat or voip apps.
There are a bunch of frameworks for handling push notifs here is a good tutorial: https://medium.com/ios-expert-series-or-interview-series/voip-push-notifications-using-ios-pushkit-5bc4a8f4d587

Related

Send SMS within Expo app without redirecting to the device default messaging app

As part of a school project I am working on, I am trying to build a messaging app that utilizes SMS as the default method for sending and receiving SMS without redirecting to the default SMS Messaging App of the device (ie sending/receiving an SMS for my app without redirecting to the Messages app on the iPhone). but I haven't found anything that can be used to achieve this.
PS: One of the requirements of the projects is not using any external library, except for the things provided with Expo,
You will have to use an external library. That feature isnt build in react Native
One external Library would be "https://www.npmjs.com/package/react-native-sms"
The only option you have if you really dont want to use external librarys is, to write your own function, which communicates with the native API

how to make a call using SIP protocol or WebRTC technology in React-Native?

Considering the development of an application in React-Native or Flutter that allows the user to click a button and make a call (that goes through service like Twilio) and this redirects it by calling to another person.
I've been looking for examples with SIP or WebRTC integration but hasn't found a lot of guides so far.
is it possible to develop something like that?

How to Send Push Notification to Xamarin Android app?

I need to implement push notification to our Android App using Xamarin. Here is the process. We have web version which used by the Manager. The Manager creates and assign job to the driver. The App version is used by the Driver where it shows the list of jobs and processes of job until its complete. So, when the Manager assigned the Job to the Driver in the Web version, it will then notified to the Driver in the App version that "new job is assigned". Basically, both the web and app uses same database then we created an api(REST API in MVC C#) to connect and get data from the db to be used in the mobile app.
Can someone recommend to me which Push notification plugin(a plugin or nuget) should I use to do this? Currently, I have set up Push Notifications through App center & Firebase but not sure how this work.
Thank you.
I need to implement push notification to our Android App using Xamarin.
I would suggest you use Firebase for mobile push notifications for Android as it is a product by Google, and was made for mobile applications. For push notifications, you will be using Firebase Cloud Messaging also known as FCM. See to it that you are well versed on how it works before you start coding anything read the documents it answers most of your questions there itself.
The Manager creates and assign job to the driver. The App version is used by the Driver where it shows the list of jobs and processes of a job until its complete. So, when the Manager assigned the Job to the Driver in the Web version, it will then notified to the Driver in the App version that "new job is assigned". Basically, both the web and app use the same database then we created an API(REST API in MVC C#) to connect and get data from the DB to be used in the mobile app.
For this, you will have to check on how to work with Firebase using Rest-API. Once you configure the Rest-API and then apply your business logic to it things will be quite easier than you might have imagined.
Can someone recommend to me which Push notification plugin(a plugin or NuGet) should I use to do this?
My recommendation is quite simple, Do not use any sort of a firebase push notifications plugin!. I have had a very bad past with plugins and ever since then I never recommend fellow developers to use plugins until it is a well-maintained one. I would rather ask you to simply configure Firebase on the basis of the guides that are available online. Like the following Xamarin.Android guide for FCM. It is detailed contains everything that you are looking for and what else I would suggest is you check firebase related answers on SO and you will find that almost everything that is not available in docs is covered around here and in detail. Like the following:
How to handle Firebase Notification i.e. Notification Messages and Data Messages
Push Notification in android with firebase get token
How to send device to device messages using Firebase Cloud Messaging?
Receive push notifications on one android app from two Firebase projects

How can iOS application interact with an Ethereum wallet

I have a dapp for web application. Users have metamask installed in the Chrome browser. They make transactions using metamask. Now I want the same application to be developed in iOS using react-native. How to develop this? For browser when users want to make any transaction simply metamask pop ups and asks for confirmation.
How about in mobile devices? How they are going to install metmask in the devices and make transactions in mobile device. Is is possible to achieve this? How can I develop this app?
Your iOS app can communicate with iOS wallets using WalletConnect mobile linking. This fulfils a similar functionality as MetaMask pop-up on desktop environments.
Yes, you don't need metamask for your application. (And I am yet to see someone use it in an app built in React Native.)
Metamask is essentially a wallet which 'injects' into various services on the web. But it is nothing more than a wallet that manages your identit(y/ies).
The features you'd need in your React app would need:
Managing identities (private and public keys.)
Ability to sign transactions.
Then you might want to use extra features such as:
Importing keys
Updating balances
Recording transasctions, etc.
If you're using web3.js, then you need to start here: web3.eth.accounts and look into wallets on the same page.
For React Native, you can use the Moralis SDK https://moralis.io/
If you're developing a native app with Swift, you can use the v1 WalletConnect SDK https://github.com/WalletConnect/WalletConnectSwift.
Also, I'm working on a package (on top of WC) that already has all the configuration for it: https://github.com/maurovz/Glaip

React Native Remote Notifications

So what are your experiences with sending remote notifications to RN app from FCM?
I did some research today, tried bunch of tutorials, but most of them didn't work.
So I wanna hear your opinion, which library are you using for this and what guide did you follow?
react-native-push-notification
react-native-fcm
react-native-firebase
react-native-onesignal
I did the connection a few days ago. It is not difficult but it requires a lot of configuration as notification is a native feature. I recommend you the following library that can help you:
React Native FCM
Also take in count the following things:
For ios you need get some certificates from apple.
This guide help with the setup and android part.
Remote notification can't reach iOS emulator since it can't fetch APNS token. Use real device.
I used to react-native-fcm, but now I use react-native-firebase, it is simple to use, just follow the documentation https://rnfirebase.io/docs/v5.x.x/getting-started
just follow the installation tab guide, cloud messaging tab guide, and notification tab, also you can find js code there. for IOS part, you need some extra work to add some certificate to your developer id and add some certificate to your firebase app.