Have 2 apps on separate devices: Rider & Driver.
Let's say, the Driver needs to contact the Rider via messaging, or vice versa, is there a way to do it without using the stocked message app to protect privacy?
My idea was to create on both apps an empty box, add a text view for the message and send button and add the msgs to firebase db. Unfortunately, i am not sure how i would do it in Android as well as the response.
Any suggestions or how to's would be greatly appreciated.
You could probably integrate your app with Firebase.
For simple messaging, you could use Firebase Cloud Firestore
to do it and for notification, you can use Firebase Cloud Messaging
.
Messaging
You can have a sub-collection to store all the chats between the rider and driver in the form of documents. 1 chat will be a document storing the info such as time, sender, as well as message.
Notification
Send acknowledgments, chats, and other messages from devices back to your server over FCM’s reliable and battery-efficient connection channel.
You could start research from Firebase sample application.
Highly recommend you go through this third party tutorial: Firebase Tutorial: Real-time Chat to get some idea, it's in iOS but the concept is the same.