I am trying to learn how push notifications work.
Please correct any wrong idea.
This is my current understanding:
- When I install a messaging app and allow push notifications, a unique token gets generated to identify the app and the device.
- When I receive a message, the notification is not sent to my phone directly. Instead, it is sent to a Google server with the added token.
- Google server checks the token and then knows where to redirect that notification.
- The notification is sent to Google Play Services app running on my phone and I can see the delivered message.
When I look at the notification, I can see the message content. Does it mean that Google servers and Google Play Services can see it too? What kind of data can they get from push notifications?