[Firebase] Unable to send pushnotification using firebase

Forge Component
(11)
Published on 2 Oct (3 weeks ago) by Labs
11 votes
Published on 2 Oct (3 weeks ago) by Labs

Hi I am working on the mobile application which connects to service module there i am trying to send the pushnotification using firebasemiddleware. i am sending the current user id to send the push notification, But i am not getting any notification to mobile as well as from the response for send pushnotifcationtouser action. Attached the screenshots,Can any one help me on this

Hi,

I am using the below forge component & it is working perfectly with respect to all ceratin use case:

https://www.outsystems.com/forge/component-overview/4991/firebase-mobile

assif_tiger wrote:

Hi,

I am using the below forge component & it is working perfectly with respect to all ceratin use case:

https://www.outsystems.com/forge/component-overview/4991/firebase-mobile


Did you used firebasemiddleware to send push notification message from server?


assif_tiger wrote:

Hi,

I am using the below forge component & it is working perfectly with respect to all ceratin use case:

https://www.outsystems.com/forge/component-overview/4991/firebase-mobile

Even i am using the same but i am facing this issue. When i check the device table in firebase middleware app i could able to see multiple devices registered for that user. Will this be an issue while sending push notifications to app?

Attached screen shot for refference

laxmiprasanna b wrote:

assif_tiger wrote:

Hi,

I am using the below forge component & it is working perfectly with respect to all ceratin use case:

https://www.outsystems.com/forge/component-overview/4991/firebase-mobile

Even i am using the same but i am facing this issue. When i check the device table in firebase middleware app i could able to see multiple devices registered for that user. Will this be an issue while sending push notifications to app?

Attached screen shot for refference

No that's not an issue, coz while initiating the push notification from firebase middleware you provide firebase_registration_token to firebase server.

Thus firebase is no more interested in your redundant records, what matters is the token which is generated by firebase based on specific to device & provided to device i.e initially when you install & register with firebase.


I think I found where you are doing a mistake...

Are u sure you are storing the registration_token return by firebase server to the mobile app on your DB somewhere against that logged-in user?

So that the next time when u want to send a notification to that particular user then you just fetch the saved token & provide from Middleware to Firebase server.



assif_tiger wrote:

laxmiprasanna b wrote:

assif_tiger wrote:

Hi,

I am using the below forge component & it is working perfectly with respect to all ceratin use case:

https://www.outsystems.com/forge/component-overview/4991/firebase-mobile

Even i am using the same but i am facing this issue. When i check the device table in firebase middleware app i could able to see multiple devices registered for that user. Will this be an issue while sending push notifications to app?

Attached screen shot for refference

No that's not an issue, coz while initiating the push notification from firebase middleware you provide firebase_registration_token to firebase server.

Thus firebase is no more interested in your redundant records, what matters is the token which is generated by firebase based on specific to device & provided to device i.e initially when you install & register with firebase.


I think I found where you are doing a mistake...

Are u sure you are storing the registration_token return by firebase server to the mobile app on your DB somewhere against that logged-in user?

So that the next time when u want to send a notification to that particular user then you just fetch the saved token & provide from Middleware to Firebase server.




I am not doing any registered token saving in Db.  Could you tell me what i have to do for it? 

When your user Login, thus in your login action call InitCloudMessaging Action from FirebaseMobile.

This action returns a response structure, from that, save the :

InitCloudMessaging.Response.RegistrationId

in your local/sync it to server DB for the further use as I mentioned.

Solution

Thanks assif_tiger. I was able to get the notifications from the firebase now. Issue is with wrong applicationID. So when it is fetching users with applicationId combination i am not getting any devices to send PN.




Solution

Happy to know... you resolved it