doujie4050 2017-11-13 09:33
浏览 10
已采纳

Web应用程序的邀请系统(推送)

I am creating an web app and a user can start a game with multiple players (your friends). This game is played on 1 device. Is it possible that all invited players get a notification on their device where they can accept or decline the invitation ?

So in steps

  • Player 1 creates a game and invites player 2 and 3
  • Player 2 receives a notification on his mobile device and presses accept, he is added as player of that game
  • Player 3 doesn't have a device and enters his PIN to accept his participation.

The step that I want to have is step2. I have read about OneSignal who can send push notifications to specific users, but I could not find if you can send a response back (accept or decline). Or is there an other way (without to have a native app).

  • 写回答

1条回答 默认 最新

  • dtip91401 2017-11-13 09:50
    关注

    your question is understood but at this moment a little too broad. But. I will try to answer in concept also :)

    Now...you said you already know how to send target specific notification with OneSignal.

    What you need to do from now one it cloud be like this:

    • Attach a link or click or action to that invite. Or when such invite arrived open a particular view in the app/web/application that you are developing and revives the link.
    • Attach the session/game/user/object ID to that link and send the call to you API (which is based on your server). If you have an API, if you don't you can have a very simple API build to handle only such requests with URL xxxx.com/path/to/api/call/var1/var2/var3/etc
    • From there you can catch the request and reply or adapt accordingly on your server side.

    Maybe this Framework can help you to speed up the API dev in PHP. Lumen can do that trick.

    You can follow this tutorial here for a fast API development with it.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突