0

I have overrided public void onMessageReceived(RemoteMessage remoteMessage) in FirebaseMessagingService.

Then i send data-only push.

When screen of device is on onMessageReceived is called successfully. Some little time after device locking (screen is off) onMessageReceived is called successfully too (for another sended push of course).

But if device is in deep sleep mode then onMessageReceived is not called until i press lock/power button.

Are there any idea, how to popup notification in deep sleep as soon as push sended?

PS: if i use notification-payload in firebase push - i can't localize it in android app (if you have any idea about it - it's superb too).

Michael Andreev
  • 362
  • 2
  • 13
  • My problem is that _onMessageReceived is not called_ for _data-only push_ in _deep sleep_. "If your payload contains only a data key, your app will handle all push messages itself. E.g. they are all delivered to your onMessageReceived handler." - is not solution to popup notification as soon as push sended. – Michael Andreev Jul 15 '16 at 11:07
  • What is deep sleep? – Tim Jul 15 '16 at 11:11
  • [for example](http://stackoverflow.com/questions/10119034/what-is-the-difference-between-sleep-mode-and-deep-sleep-mode). I my case - about 5minutes after screen-off (device locking). – Michael Andreev Jul 15 '16 at 11:12
  • What device are you using? Have you tried this on another device or emulator? – Arthur Thompson Jul 16 '16 at 14:13
  • I have tried on 3 real devices (including Nexus 7) with 4.2, 5.1 android. If push occurs in ~5 minutes interval after device locking - it's ok, but if later (for example ~10 min) push notification is lagged for minutes or received immediately after manual unlocking only. – Michael Andreev Aug 08 '16 at 11:03
  • Resolved with delay_while_idle=0 on server – Michael Andreev Aug 09 '16 at 14:17

0 Answers0