1

I am developing an Android app for dog owners. They can invite to walk each other so I would like to send a notification from one user to another. How can I done it? If I want the easiest solution, i.e. not have to configurate my own server and stuck with Java (no Javascript). I read this article https://firebase.googleblog.com/2016/08/sending-notifications-between-android.html but I would like to avoid using Javascript and another provider. So far I have implemented FirebaseIDService and MyFirebaseMessagingService. I am able to get messages from the Firebase console. Is it possible to send a message to the Firebase server and it will send a notification accroding to the given user id from previous message using Messaging API .

user3637775
  • 499
  • 4
  • 20
  • There is no way to send direct device-to-device messages with Firebase Cloud Messaging. You will always need to set up an app server for that. The article you linked explains why that is: since sending messages requires that you specify the server key. Also see: http://stackoverflow.com/questions/37634046/is-it-possible-to-send-pushnotifications-using-firebase-cloud-messaging-fcm-t or many of the other questions in this list: http://stackoverflow.com/search?q=%5Bfirebase-cloud-messaging%5D+device+to+device – Frank van Puffelen Dec 14 '16 at 19:23
  • Thanks. So wont I avoid using a node process right? https://firebase.googleblog.com/2016/08/sending-notifications-between-android.html in your arcticle where am I suppossed to add a node.js? – user3637775 Dec 14 '16 at 19:32
  • You just need a server-side process that listen to the Firebase Database and calls Firebase Cloud Messaging. It can definitely also be done in Java, have a look at our admin SDK: https://firebase.google.com/docs/database/admin/start – Frank van Puffelen Dec 14 '16 at 20:01

0 Answers0