将数据从 Django 应用推送到 Android 应用
我有一个 Django Web 应用程序正在收集各种信息。一旦它得到一些东西,我希望它能够将其推送到 Android 设备。对于此用例,Android 设备将始终运行该应用程序。我可以通过让 Android 轮询 Django 应用程序来做到这一点。我想知道是否有办法将 Django 应用程序推送到 Android?
I have a Django webapp that is collecting all sorts of information. As soon as it gets something I want it to be able to push it to the Android device. For this use case, the Android device will ALWAYS have the app running. I could do this by having the Android poll the Django app. I was wondering though if there is a way for Django app to push to the Android?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用Android 版 Google 云消息。
Use Google Cloud Messaging for Android.
您可以查看 Android 云到设备消息传递框架
这是一个利用该框架的 django 原型: https://github.com/patrickbaumann/c2dmprototype
You could check out the Android Cloud to Device Messaging Framework
Here is a django prototype utilizing the framework: https://github.com/patrickbaumann/c2dmprototype