Agora.io issue in Reactjs and React Native - reactjs

I have the next problem, I have a Mobile app that will be using for the users. A web app that will be using for the admin. I already develop both apps but I have a problem, I don't have a way to know who user is connected.
Both app are working with Firebase, users and admin are in the same Channel but I don't found a way to know which user is online.
React Native: https://github.com/syanbo/react-native-agora#readme
Reactjs: https://github.com/jjrajani/react-agora.io
Please, help me. Thanks. I want a way to assign an unique ID to each user (mobile app) and get those ID inside of web app.
PD:
The users will have the camera opened everytime and they can't listen or watch the others members (including admin). Just the admin can watch and listen to everybody but the admin needs to have a way to know which user is connected.

You need to assign unique uids to each user inside the join channel method both Web and React Native
You will receive this uid on the receiver's side while listening to "stream-added" event on the web and "userJoined" event on the React Native

Related

React Native - Real-time chat/push notifications on PHP/MySQL back-end

I am developing my first React Native app and are struggling with the proper implementation of push notifications and real time chat. The attached image shows the current layout without chat/notifications.
The client application uses Firebase only for social network authentication (login) and image storage.
Everything else is kept back-end using PHP/MySQL which also communicates with Firebase for session token validation and email authentication (login).
Now i want to implement a real-time chat function and push notifications but are struggling with the proper way of doing it. If i have understood correctly one way could be: Socket.io (for real-time chat using mysql for archive storage) and Onesignal (for push notifications)
Or is there a better way of doing this when using a PHP/MySQL as back-end?
Any ideas or input is greatly appriciated.

How to provide offline access to an app in React Native?

I am new to React Native and currently building an App in Expo. I am trying to add an offline feature in my app. Take Profile Screen for e.g. if a user updates his/ her name in the app and it doesn't have the internet access/ is offline so when the user gets back online his/ her name will be uploaded on the database. Till then, it should be able to see his updated name on his phone only.
So far I have build only front end part which accepts Name only. But don't know how to add this feature in my app ?
I am good at developing frontend but don't have a good knowledge how to connect frontend to db and backend. It will be helpful if someone can put some highlight for that?
Can anyone tell me how to achieve this type of offline feature ?
There are many way to achieve something like this. This works out of the box with Cloud Firestore, which is one way to accomplish offline functionality/persistence.
Check out this: Using Firebase with Expo.
One more way is you can use Asyncstorage if it's only a name field you want to store offline expo asyncstorage.
To send the updated name to database when user is online, you can use Netinfo expo netinfo to check whether user is able to access internet or not.

Is subdomain possible in React JS

Hi I am creating an app which have 3 parts- Admin, Client and User. Admin has all the features, while client has some of the features while client has some. So I thought to have a common code base and will be providing access based on subdomain.
Now I could not find any suitable article across the internet for the same.
Lets say the user clicks the link admin.company.in/login it will open admin login page.
Similarly, client.company.in/login will open client's login page
How can I achieve this and also test it locally?
React has nothing to do with this. You have to build two different react applications and server them client.company.in and admin.company.in respectively. To achieve this you have to deploy the application to the server and server with webserver (eg:nginx).

(React Native) How to share a message to a particular person on LinkedIn

I'm working on a react-native app in which I need to share a message with a particular person/friend/connection on LinkedIn.
I tried react-native's Share component but when I select the LinkedIn app to share my message, it just post the message to my profile wall (and not sending it to a particular connection).
Other apps like Facebook Messenger for example, when I select Share with Messenger it allows me to send the share message to the user(s) I select.
For me you have 3 possibilities:
To find the right Linkedin App callback url (ex: linkedin://profile?id=[id]), my answer on this question should help you.
To look if using the react-native-share dependency can help you.
To implement and use a Native Module with the Linkedin SDK.

How to access my app registration details after Lifelog web portal is closed?

I developed an android application last year which uses lifelog api but I check recently that I can no longer initialise lifelog within my app and I want to know if there are other ways to see the app registration details such as the client id and secret etc.
Unfortunately the Lifelog API has been completely shut down at this point and there is no way to access it. We apologize for the inconvenience!

Resources