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 51单片机使lcd显示器开机闪烁预设字符闪烁3次需要加什么代码
  • ¥50 C# 使用DEVMOD设置打印机首选项
  • ¥15 麒麟V10 arm安装gdal
  • ¥15 想用@vueuse 把项目动态改成深色主题,localStorge里面的vueuse-color-scheme一开始就给我改成了dark,不知道什么原因(相关搜索:背景颜色)
  • ¥20 OPENVPN连接问题
  • ¥15 flask实现搜索框访问数据库
  • ¥15 mrk3399刷完安卓11后投屏调试只能显示一个设备
  • ¥100 如何用js写一个游戏云存档
  • ¥15 ansys fluent计算闪退
  • ¥15 有关wireshark抓包的问题