233
Views
8
Comments
Solved
[Firebase] Unable to send pushnotification using firebase 
Question
firebase
Reactive icon
Forge asset 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


response.png
UserImage.jpg
laxmiprasanna b
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.




2021-04-09 11-42-43
assif_tiger
 
MVP

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

UserImage.jpg
laxmiprasanna b

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?


UserImage.jpg
laxmiprasanna b

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

devicedetails.PNG
2021-04-09 11-42-43
assif_tiger
 
MVP

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.



UserImage.jpg
laxmiprasanna b

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? 

2021-04-09 11-42-43
assif_tiger
 
MVP

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.

UserImage.jpg
laxmiprasanna b
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.




2021-04-09 11-42-43
assif_tiger
 
MVP

Happy to know... you resolved it

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.