31

I have disabled WhatsApp's access to Internet by disabling both WLAN-usage and mobile network usage.

I thought this should block WhatsApp from accessing the internet. But miraculously WhatsApp gives me a message with ominous content: "You might have new messages"

When I open WA it does not show any messages. When I then give it back it's access rights wonder what, there are messages I received the same day!

So to me it looks as if this app has found its way to sneak around my network restrictions.

So the following questions arise:

  • Is my assumption about the effectiveness of restricting the "data usage" for apps wrong?
  • Does WhatsApp hack around the standard restrictions?
1

3 Answers 3

40

App developers can tell better but what I perceive is that many modern apps use Firebase Cloud Messaging - a proprietary service from Google, not part of AOSP - for push notifications. In fact developers are forced to use Google's proprietary products unnoticeably. Quoted from here:

The Doze restriction on network access is also likely to affect your app, especially if the app relies on real-time messages such as tickles or notifications. If your app requires a persistent connection to the network to receive messages, you should use Firebase Cloud Messaging (FCM) if possible.
...
FCM is optimized to work with Doze and App Standby idle modes by means of high-priority FCM messages.

FCM is a part of Google Play Services (1):

FCM SDK's only hard dependency is Google Play Services

Play Services is a set of apps which are injected to Android devices with highly privileged permissions, so they aren't subject to data/battery restrictions.

Since you have blocked only the app and not Play Services, app may receive push notifications (though the actual data may not be delivered to the app).

So block GMS in order to block push notifications. Or choose the apps which aren't fond of Google.

RELATED: What is the exact functionality of Google Play Services & Services Framework?

2
21

As you have denied direct network access, WhatsApp can't access the Internet for directly sending/receiving data. However push notifications on Android are mostly not received by the apps. Instead all configured push notifications are received via Google Play Services. The Google Play Service is a different app on your device that still has Internet access.

Those push messages mostly don't contain the actual message and instead are just used as a notification that new data is available. Whenever such a push notification message arrives WhatsApp knows that there are new messages and tries to contact the WhatsApp server to retrieve it.

In your case the connection to the WhatsApp server fails and WhatsApp only displays you the message "You might have new messages".

5

No, WhatsApp does not hack around the network restrictions.

The app, after a certain amount not being able to connect to its server because you have disabled internet connection, is just guessing. That's why you get the message: "You may have new messages" from its Failure notifications channel.

From How to stop WhatsApp 'You may have new messages' notification:

As such, though WhatsApp is running and mobile data is turned on, it may not be able to access the internet. It's only recourse is therefore to throw this notification as a guess since I suspect it can’t tell the difference when a poor network is to blame and when its network rights are being micromanaged by the OS.

1
  • 4
    WhatsApp uses FCM push notifications to notify the app when there are new messages. FCM is part of Google Play Services and so works even if the app itself has no network access. Normally, the WhatsApp server pings the WhatsApp app via FCM, the app wakes up and checks for new messages, decrypts them, and shows a notification. But in this case, it's unable to check for new messages, so it just reacts to the ping by saying "you may have new messages".
    – vurp0
    Commented Sep 13, 2019 at 9:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .