javascript - MobileServiceClient.getPush() 方法在 Azure 移动服务中无效到 Android、JS 后端教程

标签 javascript android eclipse azure azure-mobile-services

我正在尝试通过 JS 后端获取适用于 Android 的 Azure 移动服务的推送通知,但我陷入了教程的这一行 ( http://azure.microsoft.com/en-us/documentation/articles/mobile-services-javascript-backend-android-get-started-push/ ):

ToDoActivity.mClient.getPush().register

Eclipse 没有看到 MobileServiceClient mClient 有 getPush 方法。

我花了几个小时在这上面,我发现有 2 个 MobileServiceClient 对象;一种来自 .NET 客户端库 ( http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.mobileservices.mobileserviceclient.aspx ),一种来自 JS 客户端库 (msdn.microsoft.com/en-us/library/jj554219.aspx)。只有 .NET 客户端库中的 MobileServiceClient 具有 getPush 方法,但由于某种原因,作为 Mobile Services SDK 一部分的 MobileServiceClient 是 JS 客户端库中的 MobileServiceClient。

我已经尝试了很多方法,但仍然没有成功。任何帮助将不胜感激!

最佳答案

快速入门项目(从门户中的“创建新的 Android 应用程序”部分下载)没有最新版本的 Android SDK for azure mobile services 。我刚刚更新了它,如果您再次下载该项目,应该能够使其正常工作。或者,您也可以直接下载SDK,将项目libs/文件夹下的mobileservices-1.0.0.jar文件替换为下载的SDK中的mobileservices-1.1.5.jar文件。

关于javascript - MobileServiceClient.getPush() 方法在 Azure 移动服务中无效到 Android、JS 后端教程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25054542/

相关文章:

android - 如何判断一个Android项目是否是使用Eclipse ADT制作的?

Javascript 引用顺序

android - 应用无法在具有更高API的测试设备上启动

android - 更新现有列表项的数量而不是添加新项

android - 谷歌播放 : Application is not compatible

java - 将 scala 类型规范更改为 java 类型规范

java.lang.ClassNotFoundException : Class org. apache.hadoop.hdfs.DistributedFileSystem

Javascript:同步使用异步 AJAX

javascript - 具有水平和垂直滚动主体的固定表头

javascript - 使用 jQuery javascript 根据域显示内容