53
Views
2
Comments
[Firebase Mobile] Configuring Firebase Push Notification to work when logged out (mobile app)
Question
Forge component by David Sousa
22
Published on 26 May 2020

Hi,

I have installed the Firebase Mobile plugin on my mobile app, based on the Firebase Mobile sample available at forge, and it is working.

This sample only works if the user is logged in the app. Could you please help me how to configure to receive push notifications when the user is logged out? Coul you share a sample?

I have tried to withdraw the unregisteredDevice on logout but still don`t receive any notification if logged-out.

Thank you and best regards,

Luis 

Rank: #240

Hi LHHB,


As per my understanding, on the InitCloudMessaging client action in the firebase mobile plugin, helps us to register our device and gets the token as registrstionid (which will have expire) from the FCM server, So when you send the push notification from firebase, firebase will check all the devices with active tokens( tokens which are not expired) it only send notification only to those device.

This is as per my understanding, Correct me if I am wrong.

Thanks & Regards,

Koushik Prathi


Rank: #5527

Hi Koushik,

maybe you are wright.

However, when I go to the Firebase Console (Cloud Messaging) should I see the registered users?

I even can`t test a notification sent by Firebase Console. 

What am I missing? Note that I can acess Analytics for my app, and I realy can send notifications but as long as the user is logged in the app, because I am sending to UserId besed on the OS databse entity Users.

Notes: using platform OS11, cordova-plugin-googleplus 8.4.0.

Thank you,

Luis Barqueira