I do not know whether this is an appropriate question for this site or not. However, searching the Internet has not lead me to anything. I have searched some other questions on this site related to Inter App Communication and they are not really quite what I wanted.
I am creating 2 apps. Let's call them App A and App B. They would be used to keep track of visitors to a particular community. Now, whenever a visitor enters the apartment details of the Unit that he wants to visit in App A, a notification should be sent to the current resident of the Unit (he will be logged into the app). I will be achieving this using Firebase Cloud Functions/Messaging. Now, when the resident of the unit approves the notification, App A should be communicated the approval/rejection.
I am having trouble with the latter part. How do I communicate a value between 2 apps?
Also, I am open to suggestions on other ways to approach this problem.
EDIT: Also, I forgot to mention that these apps will be running on different devices.
To make things clear, I would like to put forward the way I am thinking of approaching it. The Visitor enters his details in App A. They go into a Firebase Realtime Database. This would trigger a Cloud Function. This Cloud Function would send a notification to the logged-in user on App B. The user of App B would then approve or reject the Visitor. I need a way to communicate this decision to the other app.
EDIT 2: After doing a bit more research on this topic, I discovered the Pub/Sub model. Would that model work for the task that I have described?