0

I'm new in IOS (swift) and Android. I have read about FCM (Firebase Cloud Messaging). I would send push notifications one to one. I know that it is dangerous using my firebase server key. So, what I can do to send push notifications device to device? Maybe I can use a custom server? I would have some informations about this. Thank you in advance.

Carlo
  • 813
  • 1
  • 15
  • 34
  • Are the two devices on the same account on the database? – codykochmann Aug 20 '16 at 18:47
  • No one device to another – Carlo Aug 20 '16 at 19:44
  • 1
    Sending device-to-device messages will require a server: http://stackoverflow.com/questions/37435750/how-to-send-device-to-device-messages-using-firebase-cloud-messaging. I highly recommend reading [this post on the Firebase blog](https://firebase.googleblog.com/2016/08/sending-notifications-between-android.html). While it talks about Android-to-Android device messaging, the exact same approach (and the same server-side script) will work for iOS too. – Frank van Puffelen Aug 20 '16 at 20:55
  • Thank you. I'll see that – Carlo Aug 20 '16 at 21:14
  • @FrankvanPuffelen : I'm not expert in this field and so I would have some hints. I have had little experience with xampp working locally but my server should be online 24h to send messages between smartphones. how can I create or recover a server which should be always online? Thank you for your patience. – Carlo Aug 21 '16 at 16:57
  • 1
    The blog post I linked you to doesn't use XAMPP, but a simple node script. I you search for hosts that can run custom node script you will find hundreds of options. Recommending one is off-topic on Stack Overflow, but there are bound to be plenty of review sites. – Frank van Puffelen Aug 21 '16 at 21:28

0 Answers0