3

I am trying to implement a simple android app that has the ability to send device to device notification, like in almost any IM app exists. In my app the implementation is even simpler, since there is only one user that receive notifications. All the other users can send them to him. I am trying to find a solution for the last 10 days and so far I only found that it is hard do do it using Firebase Cloud Platform (since I need to implement my own server), and that it is maybe possible using oneSignal. Have anyone done this before? Have anyone used oneSignal and can tell me if I can easily implement it without building another server?

Thanks!

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Ariel B
  • 31
  • 1
  • 1
    IM apps don't send device to device notifications. They send messages, often through a server, occasionally through peer-to-peer networking. You might be able to do what you're asking with peer-to-peer, but you'd only be able to connect a few devices to the message receiver. It sounds like a server solution would be the right answer, but I'd need more details. – matt snider Jul 18 '16 at 17:43
  • 1
    Firebase has a "server" that you would use so you store the message in firebase then pull from firebase when the other device gets the message – tyczj Jul 18 '16 at 17:43
  • Have a look at the `firebase\AndroidChat` repo - https://github.com/firebase/AndroidChat/tree/master/app/src/main/java/com/firebase/androidchat – Clive Seebregts Jul 18 '16 at 17:46
  • 1
    @CliveSeebregts that sample is incredibly old and hasn't been updated for the latest Firebase releases. For a more up-to-date sample I'd recommend this [codelab for building an Android chat app on Firebase](https://codelabs.developers.google.com/codelabs/firebase-android/). – Frank van Puffelen Jul 18 '16 at 19:02
  • @ArielB: device-to-device messaging with Firebase Cloud Messaging requires that you have an app-server, where you can run trusted code (since it needs to use your Server Key, which is considered a secret value). See [this question](http://stackoverflow.com/q/37634046/) for an explanation from an engineer. To see how to send messages from a node.js process, see my [answer to this question](http://stackoverflow.com/q/38016652/). But asking for a tutorial on any of these is off-topic here on Stack Overflow, where its preferred that you show what you've tried. – Frank van Puffelen Jul 18 '16 at 19:06
  • 1
    Thanks @FrankvanPuffelen – Clive Seebregts Jul 18 '16 at 19:15
  • 1
    As you guys said, I can build an app server to solve my problem. But, this is a very complicated solution, so I am trying to avoid that. In the past, I used Parse's client push to implement user to user push notification without implementing a server myself. Does anyone know if I can do the same thing with oneSignal? – Ariel B Jul 18 '16 at 19:25
  • 1
    I'd like to know too. @ArielB If you find out could you please update us. Thanks – user172902 Jul 24 '16 at 05:46

0 Answers0