connectycube chat implementation chart in react native without redux - react-native

Dear friend I create chat app in react native by connectycube
but when 2 opponents connect to a dialog by this code message didnot send to server
msg.id = ConnectyCube.chat.send(opponentId, msg,(error)=>{
alert(JSON.stringify(error))
});
but when a opponent connect to chat and another opponent not connect message send work correctly

I see what's wrong here.
type="3" - it should be type="chat" for 1-1 and type="groupchat" for groupchat

Related

Can i use expo-linking for a phone call

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

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.

selecting react native push notification

I am using react native and trying to add push notification.
My application need push notification because of chatting. I just need push notification to appear whenever the user receives chat message.
I've searched couple of libraries about push notification and found out firebase and react-native-push-notification.
Which one is proper library for this case and please tell me if there is other better way to solve this problem.
We're using invertase firebase notification library which is working so far better without any issues.
You'll get almost all the options which you needed for push notification customization like badges, etc.

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.

How to open chat page of WhatsApp using my own android application?

I want to send message to multiple people using my android application ,but for that I required to open Broadcast list option on chat page.so how to open chat page using android application?
Try the following code:
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send.");
sendIntent.setType("text/plain");
sendIntent.setPackage("com.whatsapp");
startActivity(sendIntent);