You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently experiencing the situation that notification messages sent through FCM wakes an android app. This causes a false positive on showing a user being online.
I am using user presence via Firebase Realtime Database in connection with Cloud Firestore.
When an app has an open database connection (.info/connected == true), a cloud function sets a corresponding value in Cloud Firestore, which declares a user online. On the other hand, when the app is in background for a certain amount of time, that connection is lost, so .info/connected switches to false, which causes the user is shown as offline.
So when an android device receives a push notification via fcm, that client will be awoken. That causes the user being online.
Do you have any suggestions for me? Am I doing something tremendously wrong?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys
I am currently experiencing the situation that notification messages sent through FCM wakes an android app. This causes a false positive on showing a user being online.
I am using user presence via Firebase Realtime Database in connection with Cloud Firestore.
When an app has an open database connection (.info/connected == true), a cloud function sets a corresponding value in Cloud Firestore, which declares a user online. On the other hand, when the app is in background for a certain amount of time, that connection is lost, so .info/connected switches to false, which causes the user is shown as offline.
So when an android device receives a push notification via fcm, that client will be awoken. That causes the user being online.
Do you have any suggestions for me? Am I doing something tremendously wrong?
Thanks for you inputs.
Kind regards,
Chris
Beta Was this translation helpful? Give feedback.
All reactions