Android Question [SOLVED] Firebase push messages: always online ?

peacemaker

Expert
Licensed User
Longtime User
HI, All

I have made an app template that sends commands and replays via Firebase push messages.
I'm sending just "data", without "notification".
0) Starter service is Foreground service.
1) When screen is on - all works OK, commands are sent and received and replied OK.
2) Also i use PhoneWakeState.PartialLock
3) And on the test device the app is setup without power limitation, and Internet without linitation. It's Android 9 and WiFi connection.

4) And if to switch the screen off, after several mins - no reply from this second device if to send a command.
5) If to switch the screen on - the reply (to those command) is immediately received.

Who tried to develop the same apps - is it correct situation ? Is Firebase sleeping and push can be delivered only if user is active ?

Or must work always if PartialLock is applied?
 
Last edited:

peacemaker

Expert
Licensed User
Longtime User
UPD: also started another app that 3 times per minute sends accelerometer info to my server (also with PartialLock) - it worked (whole week) and works now OK with the screen off.
And FB push stopped to work after several mins, but my accel app is working as should... So, WiFi-internet is working all the time OK.

But i think that pushes must work anytime, who did and knows ?
 
Last edited:
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
The task is the remote control, so i need the app that for sure is "online", with help of FCM. So, task to make it working for sure with the screens off.
And again, Erel - the WiFi is working OK, as another my app is sending data to my server 3 times per minute, whole the week.

And "notification" is not needed, just "data" transfer is required "online forever".
 
Upvote 0
Top