简体   繁体   English

在Android上使用Windows Azure推送通知

[英]PUSH notifications on Android with Windows Azure

I have spent a long while searching for a guide on implementing PUSH for Android with Azure with no luck. 我花了很长时间寻找有关使用Azure实现Android推送的指南,但没有运气。 Is this just not available yet? 这还不可用吗?

If not, is there an alternative way I can implement this, perhaps by using HTTP Requests from the server side to another service that can Push to android? 如果没有,是否有另一种方法可以实现这一点,可能是通过从服务器端使用HTTP请求到另一个可以推送到Android的服务?

Thanks 谢谢

Windows Azure supports push notification through Mobile Services which is still a preview feature. Windows Azure支持通过移动服务进行推送通知,这仍然是一种预览功能。 And it currently only supports Windows Store, Windows Phone and iOS apps. 它目前仅支持Windows应用商店,Windows Phone和iOS应用。 Support for iOS hasn't been available for that long which could mean that Microsoft is also working on other platforms like Android. 对iOS的支持还没那么久,这可能意味着微软也在开发Android等其他平台。

Your other option is to build something yourself, use existing tools like GCM or to use a third-party provider like Pushwoosh . 您的另一个选择是自己构建一些东西,使用像GCM这样的现有工具或使用像Pushwoosh这样的第三方提供商。 The great thing about Pushwoosh is that they have a free plan, they support Android and they have a REST API which can be called from Windows Azure to create the notifications. Pushwoosh的优点在于他们有自由计划,他们支持Android, 他们有一个REST API ,可以从Windows Azure调用以创建通知。

Reading online documentation seems to suggest that you need to use a Mobile Service in Azure. 阅读在线文档似乎表明您需要在Azure中使用移动服务。 You should be able to use the Push option on the Mobile Service to connect to Google Cloud Messaging which connects to the Android client. 您应该能够使用移动服务上的“推送”选项连接到连接到Android客户端的Google Cloud Messaging。 GCM authentication requires that you add the IP address of the Mobile Service to a white list. GCM身份验证要求您将Mobile Service的IP地址添加到白名单。

However there is an easier way... I can access the GCM API directly from my azure website (after adding the IP address which is not available in free mode). 但是有一种更简单的方法......我可以直接从我的azure网站访问GCM API(在添加了在免费模式下不可用的IP地址之后)。 To see my code look here 看到我的代码看这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM