无警报推送通知 [英] Push Notifications without alert

查看:24
本文介绍了无警报推送通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在没有警报视图的情况下获得推送通知吗?游戏服务的想法将发送通知作为更改游戏状态的响应(可能游戏状态将存储在数据库中),如果这是不可能的,您可以建议我如何向每个连接的游戏客户端发送新游戏状态作为响应改变游戏状态.

Can I get push notifications without alert view? The idea in what service for game will send notifications as response for change game state (may be game state will store in database), if this is impossible, what you can suggest about how me send new game state to each connected game client as response of changing game state.

将为 iPad 开发游戏.

Game will be developing for iPad.

谢谢,罗马

推荐答案

否,推送通知将始终显示通知,因为它需要用户同意才能唤醒或启动您的应用程序.但是,如果您的应用程序在前台并正在运行,则不会出现推送通知,您的应用程序可以处理推送通知所具有的消息.以上所有内容同时适用于本地通知.

No, a push notification will always display a notification as it requires user consent to wake up or launch your application. However if your Application is in the foreground and running, the push notification will not appear and your app can handle the message that the push notification has. All of the preceding applies to local notifications aswhile.

我不知道你说的游戏状态是什么意思.但只需让您的应用程序监听服务器上的脚本,该脚本会将信息传递给您的应用程序.或者就像我上面说的,如果您的应用程序在前台打开,推送通知不会出现在屏幕上,您可以通过这种方式发送信息.但是,如果您想在后台执行此操作,则无论如何都不可能,除非您是真正的多任务处理(GPS、VOIP、音乐)或您通过推送通知获得用户同意.

I don't know what you mean by game state. But just have your app listen in on a script on your server which will pass information to your app. Or like I said above if your app is open in the foreground, push notifications won't appear on screen and you can send information that way. However if you want to do it in the background its not possible no matter what unless you are truly multitasking (GPS, VOIP, Music) or you have user consent through push notification.

这篇关于无警报推送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆