3

我正在做一个项目,我将使用 Django 构建一个 Web 应用程序,直接在他们的智能手机上向我的注册用户发送警报。

例如,假设用户订阅了时事通讯,我希望他的手机在收到时事通讯时按照他配置的方式进行操作(例如,响铃或摇晃)。然后他可以打开他的智能手机来阅读时事通讯。阅读后,会提示用户一个问题,以了解他是否要发表评论。如果他单击“是”,他的浏览器将在“时事通讯”页面打开,他可以在其中发表评论。如果他单击“否”,它只会关闭时事通讯,直到有新邮件进来。

有没有办法从带有 Django/Python 的 Web 应用程序中做到这一点?

谢谢 !

4

1 回答 1

4

There are four ways to handle this:

  1. Write your own custom native app for the phone. Your native iPhone app can receive push notifications from your Django app via the push notification API. You native Android app can receive notifications from your Django app via the cloud-to-device messaging (C2DM) framework.

  2. Write your own web app (HTML + JavaScript) for the phone, using a wrapper app that handles push notifications/C2DM. Adobe PhoneGap is one such wrapper app; there are probably others.

  3. Send a message via an existing service, such as Twitter or Email, for which the user already has an app.

  4. Use a service like Pushover, which has their own native app that is intended for notifications from web applications such as yours.

于 2012-08-09T19:39:23.093 回答