Question

I'm trying to get the push notifications for Azure Mobile Services for Android with JS backend going, and I am stuck on this line of the tutorial (http://azure.microsoft.com/en-us/documentation/articles/mobile-services-javascript-backend-android-get-started-push/) :

ToDoActivity.mClient.getPush().register

Eclipse does not see that the MobileServiceClient mClient has a getPush method.

I have spent hours on this, and I've found that there are 2 MobileServiceClient objects; one is from the .NET Client library (http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.mobileservices.mobileserviceclient.aspx), and one is from the JS Client Library (msdn.microsoft.com/en-us/library/jj554219.aspx). Only the MobileServiceClient from the .NET Client Library has the getPush method, but for some reason the MobileServiceClient that is part of the Mobile Services SDK is the one from the JS Client Library.

I have tried so many things and have still not managed to get this working. Any help would be greatly appreciated!

Was it helpful?

Solution

The quickstart project (downloaded from the "Create a new Android app" section in the portal) didn't have the latest version of the Android SDK for azure mobile services. I just updated it and you should be able to get it working if you download the project again. Alternatively, you can download the SDK directly, and replace the file mobileservices-1.0.0.jar in the libs/ folder of your project with the file mobileservices-1.1.5.jar which you can get in the downloaded SDK.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top