Why do I only get push notifications when I turn my phone on? I rely on a specific app's push notifications, but if my phone has been sitting on the table for a while I don't receive the notifications when they come in.

Whenever I pick up the phone and press the power button to turn the screen on, then I suddenly receive all the notifications from this app and from other apps too, including gmail. I turn on the phone and suddenly get the push notifications from the app and also push notifications from gmail about new emails.

If I have recently used the phone, then I will receive notifications at any time.

So it seems like the phone is going into some kind of sleep mode after some number of minutes.

What exactly is this sleep mode and how many minutes does it take to turn on? And how can I disable this sleep mode so that I always receive push notifications immediately?
This is most likely caused by a setting that's intended to reduce battery and service usage by turning off your data and/or wifi connection while you're not using the phone.

There's a few settings you should toggle:

1: Settings -&gt; Power -&gt; Sleep Mode
This is on by default and causes the device to turn off the data connection during longer sleep periods, meaning: When your display is off for a while it will turn off data (this includes wifi) and you won't be able to receive notifications anymore.

2: Settings -&gt; WiFi -&gt; Menu -&gt; Advanced -&gt; Keep Wi-Fi on during sleep
Change this to Always - Other options are "Never" and "Only when plugged in" (to the charger). If not set to "Always", your phone does the same as above. This is wifi only.

3: Settings -&gt; More -&gt; Wireless &amp; networks -&gt; Usage -&gt;  Menu
Here, turn off the "Restrict background data" feature. Depending on your version of Android you can choose in detail which apps you want to allow in the background, and which not. Apps which aren't allowed an internet connection in the background won't receive notifications.

4: In case you're using a power saver (In my case: Settings -&gt; Power -&gt; Power saver) you should check the settings for it too. Mine has the option to "Put data connection to sleep when screen is off" - If you have such setting you should turn this off too.

Please note that your settings names may differ slightly from mine (e.g. "Power" could be called "Battery" and your "Data Usage" settings might be somewhere else) so you might have to look around a bit, the feature we're looking for should be called the same though.