It has been realized so many times that users receive notification even if they have disabled the service of the internet. Have you ever thought about the same? If yes then here we will share some of the reasons for such notifications which occur even when the internet is disabled. It will help in knowing about the technical reason behind such happening.
Concept of Firebase Cloud Messaging
Before proceeding ahead, here comes a term called Firebase Communication Messaging and is a proprietary service from Google. Nowadays, this phenomenon is widely being used while developing any application to implement the concept of notification also called ‘Push Notification’. Generally, we all receive notifications corresponding to the application if in case any new thing gets updated. For example, if you are having a shopping app on your phone, and any discounts come then the user will get notified by push notifications because every time no one can browse the app. Hence to maintain the communication with users and keep them informed the concept of Push Notification has been introduced.
Relation between FCM and Google Play Services:
Now coming to the topic, how notifications get displayed in spite of no internet connection. As explained above FCM (Firebase Cloud Messaging) is used for Push Notification which is a proprietary service from Google and it is optimized to work in the idle mode as well which means it reflects notifications even if there no internet connection. The SDKs of FCM are completely dependable on Google Play Services and these services are forcefully get injected in all the android devices having high privileged authority. Even if there is no internet in the device, but your app is still communicating with the Play Services and this is the reason the mobile device receives notifications even if the internet is disabled. Push Notification will not reflect the whole message it will simply notify about the happening of any app which is installed in the mobile device. Whenever a user receives a notification, then at the same very moment the notification tries to create a connection with the server and if the internet is disabled then nothing happens. So notifications are getting created because FCM which is dependent upon Google Play Services.
So, Guys, you have just disabled the Internet, not the Google Play Services hence the notifications are getting flashed. We hope things are clear now and keep yourself in the loop to understand a lot more about tricky things. Stay tuned for all other updates.