[英]Multiplayer invitation not received by android device
I am using playgameservices unity plugin to implement realtime multiplayer gaming. 我正在使用playgameservices unity插件来实现实时多人游戏。 I successfully set up APNs to receive multiplayer invitations on iOS devices.
我成功设置了APN,以便在iOS设备上接收多人邀请。 But when I switch to Android, I did not see any notification both when running or not running the application.
但是当我切换到Android时,无论运行还是不运行应用程序,都没有看到任何通知。
I think I am missing something very basic, but, from scratch, what should I do to enable notifications for this purpose on Android side? 我认为我缺少一些非常基本的东西,但是从头开始,我应该怎么做才能在Android端为此目的启用通知? ie in manifest file, on developer console etc?
即在清单文件中,在开发者控制台上等?
Just realized that the synchronization on my Android device is disabled. 刚意识到我的Android设备上的同步已禁用。 So, just enabling "sync" did the trick.
因此,仅启用“同步”就可以了。 See https://github.com/playgameservices/play-games-plugin-for-unity/issues/525 for more details.
有关更多详细信息,请参见https://github.com/playgameservices/play-games-plugin-for-unity/issues/525 。
First of all you need to make sure you have the latest version of Google Play Services installed. 首先,您需要确保安装了最新版本的Google Play服务。
The procedure in android to accept the invitation is relatively simple. android中接受邀请的过程相对简单。 You have to implement a callback OnInvitationReceivedListener .
您必须实现一个回调OnInvitationReceivedListener 。 This callback is invoked when a new invitation is received.
收到新邀请时,将调用此回调。 This allows an app to respond to the invitation as appropriate.
这允许应用程序适当地响应邀请。 If you send an invite to a player with the game NOT running, Google Play Services on his phone should receive a request.
如果在游戏未运行的情况下向玩家发送邀请,则手机上的Google Play服务应会收到一个请求。 The player can then accept or decline that invitation.
然后,玩家可以接受或拒绝该邀请。
Hope this Helps!! 希望这可以帮助!!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.