带 Javascript 的 PhoneGap 应用程序的推送通知?
我有一个简单的应用程序,可以获取特定区域当前学校停课的列表,并在我的应用程序中显示结果。我希望能够将一所学校设置为“最喜欢的”,然后,如果该学校关闭,则会显示一条推送通知,内容为“您的学校已关闭!”我正在考虑如何做到这一点,我认为简单的 jQuery 可以工作。
- 用户可以用确切的名称设置最喜欢的学校。
- jQuery 将搜索某个 body 元素中的所有结尾(例如,所有元素),如果从步骤 1 中找到该名称,它将发送通知
是否有人对如何执行此操作有任何其他想法,以及我是否可以调用用 JavaScript 通知?
I have a simple app that gets the current list of school closings for a specific area and displays the results in my app. I'd like to be able to set a school as a "favorite" and then, if the school is closed, a push notification would be displayed saying something like "Your school is closed!" I was contemplating on how to do this, and I thought simple jQuery could work.
- The user would set a favorite school with an exact name.
- jQuery would search all the closings in a certain body element (example, all elements) and if the name was found from step 1, it would send the notification
Does anyone have any other ideas on how to do this, and if I can invoke the notification with Javascript?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议您使用 UrbanAirship 来提供推送通知。对于少量通知(我认为每月 2000 条以下),它是免费的。
https://support.urbanairship.com/customer/portal/articles /66970-实现-with-phonegap
I recommend you use UrbanAirship to provide your push notifications. For an small amount of notifications (under 2000 a month I think) it is free.
https://support.urbanairship.com/customer/portal/articles/66970-implementing-with-phonegap