在本地网络中推送通知 [英] Push notifications in a local network

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

问题描述

我需要在没有Internet访问权限的本地网络中使用自己的服务器实现针对Android和iOS的推送通知。
更确切地说,我的用户将拥有一个移动应用程序(Android和iOS),它将通过无线网络连接到本地服务器。此网络不会有任何Internet连接。
当发生一些具体事件时,服务器需要向连接的设备发送推送通知。

I need to implement Push Notifications for Android and iOS using my own server in a local network with no Internet access. More precisely, my users will have a mobile app (Android and iOS) which will connect to a local Server through a wireless network. This network won't have any Internet connection. The server will need to send push notifications to the connected devices when some concrete events happen.

我在服务器端使用Django。

I'm using Django on the server side.

我一直在研究,看起来使用XMPP将是一个很好的解决方案。因此,我想我需要一个XMPP服务器与移动设备进行通信。我已经看到了服务器端的几种替代方案,但我并不完全理解我需要的东西。有一些XMPP服务器,如 Openfire SleekXMPP 。我不确定他们是为了什么。我应该选择其中一个还是同时使用它们?

I've been researching a bit and it looks like using XMPP would be a neat solution. Thus I guess I need an XMPP Server to communicate with the mobile devices. I've seen several alternatives for the server side, though I don't understand completely what I need exactly. There are some XMPP servers such as Openfire and SleekXMPP. I'm not really sure what are they for. Should I choose one of them or use both?

另一方面,应用程序方面有哪些替代方案?

On the other side, which alternatives are there in the app side?

我需要的是一些关于选择哪种技术和一些参考资料的指导。

What I need basically is some guidance on which technologies to choose and some references.

推荐答案

首先,如果你决定XMPP协议..您可以使用您提到的任何服务器并使用任何移动Smack库,例如Android,移动库将使用侦听器自动更新您的事件..它是一个处理通知的软件层。

First if you decide with the XMPP protocol .. you can use any of the servers you mentioned and use any library for the mobile Smack for example for android, the mobile library will automatically update you with events using listeners .. it's a software layer that handles notifications.

其次,如果你想手动实现它......你将在移动设备上运行一项服务,通过从服务器请求更新来定期检查更新。

Second if you want to implement it manually .. you'll have a service running on the mobile device that checks for updates periodically by requesting them from server.

第三实际推送通知需要通过互联网注册,例如Android需要与Google Cloud Messaging通信。

Third The actual push notifications need to be registered over the internet, android for example need to communicate with Google Cloud Messaging.

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

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