I can think of two approaches, both involving the usage of:
- The cloud code
of the respective content type that is being updated
- Certain client app logic that subscribes the user/device for the kind of notifications.
1. Push Notifications
This is the approach covered oot of the box by Backend Services. Subscribe the user for push notifications
and send a push notification
from the afterCreate
event of the cloud code for this content type.
You can allow the users to subscribe
for certain categories/tags and sent the notification only to these users that are interested in them depending on the kind of item that is being updated/created. Thus when the app is not running you will be able to notify the user with a visual that there is something new and interesting on the server (which is the advantage of this approach). If the app is running, you will be able to handle this event and refresh your UI. More on this handling can be read here
2. Real-time messaging
Another approach would be again to use the publish-subscribe pattern and external publish-subscribe messaging provider. This should not be mistaken with push notifications.
For example, consider the following:
- The client app subscribes to a publish-subscribe provider.
- The Cloud Code of Backend Services notifies the provider that there is something new on its server and pushes the information with an external call
- When it is running, the client app is notified by the external provider that there is something new and, for example, reads/refreshes the data from Backend Services.
Let me know if you have further questions.