[Firebase] Sending to a specific user

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

Hi ! Nice component! :D

I was able to make a simple web app where it sends a firebase event to a specific user. (The generateToken has the GetUserId() )
And i'm using the generated token when sending a firebase event to a specific user.

The problem I'm facing, is that the FireBaseEventReceiver is getting every notification not taking into account the UserId i sended it to (generatedToken)

Am I missing something? I'm just trying to learn the component :P

Greetings,
Niels

Solution

Hi Niels.


We have some components that use Firebase as the messaging mechanism.

If you want to see the implementation, please try out In-App Notifications Mobile / Web or the In-App Chat Mobile / Web.

Maybe these implement the use case you're trying to achieve :)

Hope this helps.


Cheers,

Rui Mendes

Solution

Thank you !

Niels Favreau wrote:

Hi ! Nice component! :D

I was able to make a simple web app where it sends a firebase event to a specific user. (The generateToken has the GetUserId() )
And i'm using the generated token when sending a firebase event to a specific user.

The problem I'm facing, is that the FireBaseEventReceiver is getting every notification not taking into account the UserId i sended it to (generatedToken)

Am I missing something? I'm just trying to learn the component :P

Greetings,
Niels

Greetings Niels,

I am trying to understand the usefulness of this Firebase plugin. Could you tell me if with this plugin I could, for example, send events that I can later see through the Firebase Analytics console?
If this plugin does not allow it, do you know any other plugin for OutSystems that allows me to do it?
Thanks in advance for any assistance.

Best Regards.


 Manuel Migueles wrote:

Niels Favreau wrote:

Hi ! Nice component! :D

I was able to make a simple web app where it sends a firebase event to a specific user. (The generateToken has the GetUserId() )
And i'm using the generated token when sending a firebase event to a specific user.

The problem I'm facing, is that the FireBaseEventReceiver is getting every notification not taking into account the UserId i sended it to (generatedToken)

Am I missing something? I'm just trying to learn the component :P

Greetings,
Niels

Greetings Niels,

I am trying to understand the usefulness of this Firebase plugin. Could you tell me if with this plugin I could, for example, send events that I can later see through the Firebase Analytics console?
If this plugin does not allow it, do you know any other plugin for OutSystems that allows me to do it?
Thanks in advance for any assistance.

Best Regards.


Yes you can, and there's also https://www.outsystems.com/forge/component/1499/google-analytics-plugin/ that you might find useful. 

Roman Tkachenko wrote:

 Manuel Migueles wrote:

Niels Favreau wrote:

Hi ! Nice component! :D

I was able to make a simple web app where it sends a firebase event to a specific user. (The generateToken has the GetUserId() )
And i'm using the generated token when sending a firebase event to a specific user.

The problem I'm facing, is that the FireBaseEventReceiver is getting every notification not taking into account the UserId i sended it to (generatedToken)

Am I missing something? I'm just trying to learn the component :P

Greetings,
Niels

Greetings Niels,

I am trying to understand the usefulness of this Firebase plugin. Could you tell me if with this plugin I could, for example, send events that I can later see through the Firebase Analytics console?
If this plugin does not allow it, do you know any other plugin for OutSystems that allows me to do it?
Thanks in advance for any assistance.

Best Regards.


Yes you can, and there's also https://www.outsystems.com/forge/component/1499/google-analytics-plugin/ that you might find useful. 

Thanks for your reply Niels.
Could you explain or give me an example of how to do this with any of the 2 plugins?


Manuel Migueles wrote:

Roman Tkachenko wrote:

 Manuel Migueles wrote:

Niels Favreau wrote:

Hi ! Nice component! :D

I was able to make a simple web app where it sends a firebase event to a specific user. (The generateToken has the GetUserId() )
And i'm using the generated token when sending a firebase event to a specific user.

The problem I'm facing, is that the FireBaseEventReceiver is getting every notification not taking into account the UserId i sended it to (generatedToken)

Am I missing something? I'm just trying to learn the component :P

Greetings,
Niels

Greetings Niels,

I am trying to understand the usefulness of this Firebase plugin. Could you tell me if with this plugin I could, for example, send events that I can later see through the Firebase Analytics console?
If this plugin does not allow it, do you know any other plugin for OutSystems that allows me to do it?
Thanks in advance for any assistance.

Best Regards.


Yes you can, and there's also https://www.outsystems.com/forge/component/1499/google-analytics-plugin/ that you might find useful. 

Thanks for your reply Niels.
Could you explain or give me an example of how to do this with any of the 2 plugins?


Hi Manuel, here's the google analytics for outsystems docs: https://www.outsystems.com/forums/discussion/20972/google-analytics-plugin-documentation/ 

Rui Mendes wrote:

Hi Niels.


We have some components that use Firebase as the messaging mechanism.

If you want to see the implementation, please try out In-App Notifications Mobile / Web or the In-App Chat Mobile / Web.

Maybe these implement the use case you're trying to achieve :)

Hope this helps.


Cheers,

Rui Mendes

Hello Rui,


I've digged into the approach you followed there but indeed it relates to the issue that Niels were refering.


You still send the notification to everyone subscribing to "GeneralMessages". I guess the workaround is to have a targetId which will be the user/device and only send to that one? (In case there is no subscriptions).


Best regards