当应用程序在 Android 后台运行时获取 xmpp 消息

问题描述 投票:0回答:1

当应用程序断开连接时,它会停止从 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?
android xmpp
1个回答
4
投票

请勿将保持活动时间设置为少于 10 分钟,这会加载服务器。

当应用程序在后台运行时,您必须通过 gcm(适用于 Android)和 apns(适用于 iPhone)发送推送通知。为此,您需要在 openfire 上实现插件。

© www.soinside.com 2019 - 2024. All rights reserved.