Start a new topic

kinvey libraries still dependent on gcm.jar

Hi,

As I was setting up the push notifications for android, I noticed that the Kinvey libraries are dependent on "gcm.jar" to be installed.



The "gcm.jar" is the old way of doing gcm and has now been deprecated by Google. Therefore the links that the Kinvey tutorials point to are not valid now as they redirect to install "google play services" now (the newer way).



Now, Iam trying to find where I can get a copy of the old gcm.jar as the project does not seem to work without that as the "KinveyGCMService" extends the old "com.google.android.gcm.GCMBaseIntentService"



Right now, I am only in the process of assessing Kinvey as a provider for our project so this is not a big problem for me, but wanted to know if these libraries will be updated in the near future ?



Also, are you aware of a good workaround for this currently ?

Thanks

Ok, I'm having more trouble now, I found a gcm.jar from somewhere, but now the kinveygcmservice is calling the no-argument constructor which does not exist in baseintentservice ??



Can someone pls. answer this.



- ![](https://c3409409.ssl.cf0.rackcdn.com/kinvey.vanillaforums.com/editor/75/968obt9qw7r8.jpg "")

Further investigation -- looks like registration finishes and when the receiver is called to execute the "onregistered" it doesn't find a no-args constructor in GCMBaseIntentService..... ![](https://c3409409.ssl.cf0.rackcdn.com/kinvey.vanillaforums.com/editor/f6/mjz48wvkoyyq.jpg "")

Phew! finally got it working. So the gcm.jar that I had obtained was not the one that would work, and I was finally able to download the right one from here -https://code.google.com/p/gcm/source/browse/gcm-client/dist/gcm.jar?r=af0f427f11ec05c252d8424fffb9ff5521b59495



Later on I saw that there was a checkbox for "obsolete" in SDK manager, when checked it started showing the "google cloud messaging" option. This would have helped me find the right gcm. Maybe you can add that hint in the tutorial also.



Hope you change the libraries to start using the new Gcm approach soon.



Hey Vik,

Wow, good find, and well solved! I know that Ed is definitely working on updating to the new GCM approach. You're right, updating our docs in the meantime seems like a great idea.
Hi, Thanks Vik for this.



After following the steps mentioned, I am getting this error

Device does not have package com.google.android.gsf

at com.google.android.gcm.GCMRegistrar.checkDevice(GCMRegistrar.java:98)



Any suggestions on how to fix this?
Hey @robkinkc that method `checkDevice` is used to ensure gcm is only used on a google play enabled device. If you are testing on an emulator, create a new one with the google play services image instead of the android image.



More info can be found here: http://stackoverflow.com/questions/11339445/com-google-android-gsf-package-couldnt-be-found
Login or Signup to post a comment