The previous chapter helped us in building a conversational messaging application, but the Wear app had a very normal user interface with no notifications whatsoever. Notification is a very important aspect of a messaging application, but it needs complex infrastructure to process the notification. When the sender sends a message to the receiver, the receiver should get a notification conveying certain information, such as the sender name, and a quick message preview.
Notification is a component in Android that we can use to display information. In the case of a messaging application, the receiver should get the push notification to instantiate the notification component. So, whenever there is a real-time database update in Firebase, both the handheld device and the Wear device should get the notification. Thankfully, we don't need a server to handle the notification; Firebase will handle push notifications for your messaging...