一个基于Web的应用程序可以有推送通知? [英] Can a Webbased app have push notification?

查看:133
本文介绍了一个基于Web的应用程序可以有推送通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的YouTube频道web应用程序。是否有可能添加推送通知时,有上传新的视频,例如。

I'm working on a webapp for my YouTube channel. Is it possible to add push notifications for when there is a new video uploaded, for example.

推荐答案

要更具体,才能为Web应用程序发送推送通知到移动设备,如iPhone,移动设备必须已经注册接收推送通知对于特定的应用。用于推送通知的注册通过本机应用程序完成,只能通过本机应用程序来执行。一旦本机应用被注册为推送通知,它可以发送授权令牌的服务器,它可以与用于提供本机客户端的证书一起使用,以推通知发送到所述移动装置。

To be more specific, in order for a web application to send push notifications to a mobile device, such as the iPhone, the mobile device must have registered to receive push notifications for a particular application. The registration for push notification is done through a native app and can only be performed through a native app. Once the native app is registered for push notification, it can send the authorization token to the server, which can be used in conjunction with the certificate used to provision the native client, to send the push notifications to the mobile device.

作为另一个答案规定,一个选择是在本地应用程序包你的web应用。这意味着你可以创建,基本上presents一个UIWebView(为iPhone开发),以显示你的web应用程序的用户的本地应用程序。虽然这pretty以同样的方式作为本机浏览器多的功能,你就可以添加到使用本机控件推送通知注册的能力。

As specified in another answer, one option is to 'wrap' your web application in a native application. Meaning that you would create a native application that basically presents a UIWebView (for iPhone dev) to the user showing your web application. While this pretty much functions in the same manner as the native browser, you would be able to add the ability to register for push notifications using the native controls.

这将是有益的给你审查苹果的推送通知文件,因为它提供了有关如何在iPhone上推短信功能的一些pretty良好的信息。

It would be beneficial to you to review the Apple's push notification document as it provides some pretty good information on how push messaging functions on the iPhone.

见彼得Hosey提供这些链​​接:

See these links provided by Peter Hosey:

  • http://support.apple.com/kb/HT3576
  • http://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html

这篇关于一个基于Web的应用程序可以有推送通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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