A push notification client for Android built on Firebase Cloud Messaging (FCM). Makes it easy to view notifications that were pushed from multiple services.
The architecture behind Homing is as follows:
The role of UCMS is to serve as a gateway for various services that want to communicate with Homing. UCMS pushes these notifications to a FCM pool which Homing is a member of.
The role of UCRS is to handle the lifecycle of Homing. When a new device installs Homing, it will receive a new Firebase registration token. This token is sent to UCRS which adds it to a predefined FCM pool. Since UCRS unsubscribes inactive devices from the pool, Homing periodically (around every 12 hours) performs a "heartbeat" to notify UCRS that the device is alive.
FCM is utilized as the message transport protocol due to its built-in battery saving features. Since the channel is shared with other Android apps, this removes the need for developing custom polling/listening services.
These screenshots show some of the capabilities of Homing.
Since Homing is meant to be used as background service, the app solely consists of a single settings screen for performing initial setup.
If an API gateway isn't used, then the only configuration that needs to be done is to set the UCRS hostname and port of the running service. Otherwise, when a API gateway is enabled, the service name (for Host header routing), and key and key header name (if key-based auth is enabled) needs to be configured as well. The settings can be tested by clicking on the blue heart button in the toolbar. This sends a ping-pong alive check which should return "pong" popup if UCRS is reachable.
The FCM and heartbeat service will run in the background indefinitely even after the app is removed from running apps tray.
As seen in the left screenshot, notifications of various services will be present. Likewise, as seen in the screenshot to the right, whenever a heartbeat takes place, a popup will appear which will state whether it was successful or not.
Setting up Homing requires these steps to be done:
- Create Firebase project if UCRS and UCMS have not been setup yet. Follow steps here on how to create Firebase project. Otherwise, make sure to use the same project.
- Generate the
google-services.json
Firebase project config file and put it inside ofapp/
directory. Info on how to get this file can be found here. - The app can now be built and setup as needed as per UCRS runtime environment.