当应用程序断开连接时,它会停止从 xmpp 服务器获取消息。出于后台通知目的,我正在使用 GCM 服务。现在,就像 WhatsApp 一样,我希望我的应用程序也能在后台接收消息并将其保存在 sqlite 中。
Is it necessary for this task that my app would always be connected to
xmpp server?
Will it not load the xmpp server Since, so many sessions the server
will have to keep alive?
请勿将保持活动时间设置为少于 10 分钟,这会加载服务器。
当应用程序在后台运行时,您必须通过 gcm(适用于 Android)和 apns(适用于 iPhone)发送推送通知。为此,您需要在 openfire 上实现插件。