0

I have set up push notification from Firebase console and I can send push notifications. However, I cannot send device-to-device notification yet. As I gather I would need an external app server that would observe Firebase nodes for change and then would fire off a notification via FCM.

I have seen similar question in SO here and a good but brief and not so complete explanation by Frank van Puffelen here. But I am still quite confused. Any tutorial or help as to how I can set up an app server (XMPP here) that would do the communication between client app instances and Firebase for sending notification when ChildAdded or modified and handling the key exchanges would be appreciated. (as I understand, FCM needs XMPP protocol for sending upstream notification)

Any help would be appreciated.

Community
  • 1
  • 1
TheBen
  • 3,410
  • 3
  • 26
  • 51

2 Answers2

1

Following this tutorial.

Send Notifications from Server

What you can do is, setup an external server using your favorite technology to listen child_added or changed and respond to the notification requests.

We used the node.js app engine to handle this. Again the funda is to move people to use other cloud paid services.

Chandra Eskay
  • 2,163
  • 9
  • 38
  • 58
  • Thanks for the post but I addressed this partial tutorial in my post as a link. Unfortunately I cannot make a sense of it as to what goes where exactly and specifically when it comes to the app server setup. But the general picture is clear that I need to observe the nodes from my app server. – TheBen Oct 14 '16 at 08:06
  • so are you saying I can use the node.js app engine as the app server? – TheBen Oct 14 '16 at 08:12
  • @TheeBen not as an app server, but as an application which will do the processing of such requests. – Chandra Eskay Oct 20 '16 at 09:19
  • Well, the firebase documentation says app server though – TheBen Oct 20 '16 at 16:09
0

Yours it's a good question... The firebase can't send push device-to-device, then if you want to do this one, needs a app server as you said. The other possibility that I thought for a long time is a create a independent service to do two things, the first one is constantly controls events as onChildAdded, for exemple and the second one, throws local notifications.

This is solution that i think works fine before to create a app server... At final if you try to do it, explain us your experience please! Greetings!

  • Thanks for the post. Is what you are proposing intended to be for both iOS and android platform or only android? It amazes me how no one has complained about this or posted a question other than a couple I referred above. What are all these developers doing with Firebase? – TheBen Oct 14 '16 at 07:02
  • Because here comes the money... When you need app-server and you start to work with firebase, google says you... Wow you need a app-server? Then get our google-cloud-platform is integrated with firebase! xD Pure marketing, the firebase has a few limitations and they covers with google cloud platform... And for your question I be only Android developer but I think the IOS has local notifications too and services in background, then you can search a little and assess this option! – Merlí Escarpenter Pérez Oct 14 '16 at 07:15
  • I see, interesting idea , could you direct me to the specific google product you are referring to? Is the a google cloud system that could be served as the app server? if that's what you mean. – TheBen Oct 14 '16 at 08:07
  • Yes mate! This is the cloud platform for apps https://cloud.google.com/products/. But you need to programming app-server and their logic with my idea just need a *app-service, local notificactions* and *firebase realtime database*. – Merlí Escarpenter Pérez Oct 14 '16 at 08:21
  • I know about the general google cloud products, but I'm looking for a server that I can implement my XMPP handling logic and talking back and forth to Firebase.. anyways thanks – TheBen Oct 14 '16 at 09:03