[Firebase Mobile] Send Push Notification to Particular User on firebase

Forge Component
(15)
Published on 17 Jul by David Sousa
15 votes
Published on 17 Jul by David Sousa

Hi,

I want to push notification from Server using the Send-Action, but to a particular user.

I have FirebaseRegisterToken accessible to me on Server which I get when the device gets register with initAction.


Does the Input param 'UserID' of SendAction have to be used?

or

Do I need to pass the FirebaseRegisterToken to the Input param 'UserID' of SendAction?

Any help much appreciated.

Solution

Hi Assif,


The UserId parameter is used to fetch all the devices and correspondent tokens registered to a determined user.

In this parameter you should pass the UserId from the User system table.

Does this answer your question?


Regards,

David

Solution

David Sousa wrote:

Hi Assif,


The UserId parameter is used to fetch all the devices and correspondent tokens registered to a determined user.

In this parameter you should pass the UserId from the User system table.

Does this answer your question?


Regards,

David

Hi David Sousa,

Thanks, I just found the answer.


The Plugin maintains a Device Entity with reference to Token & UserID.

So as we pass the UserID, it initiates the request to the particular user based on Token.


Thanks for the Instant reply.





Hi assif_tiger,


How can we get the token for that user? When i am passing the userid to sendnotifitaiontouser action it is giving empty response and not giving any error. How to know the issue while sending pn fails?


Can any one help me on that?


assif_tiger wrote:

David Sousa wrote:

Hi Assif,


The UserId parameter is used to fetch all the devices and correspondent tokens registered to a determined user.

In this parameter you should pass the UserId from the User system table.

Does this answer your question?


Regards,

David

Hi David Sousa,

Thanks, I just found the answer.


The Plugin maintains a Device Entity with reference to Token & UserID.

So as we pass the UserID, it initiates the request to the particular user based on Token.


Thanks for the Instant reply.