easygcm icon indicating copy to clipboard operation
easygcm copied to clipboard

Getting it to work not as simple as expected, or documentation issue?

Open polaski opened this issue 9 years ago • 1 comments

Maybe it's just me, but I had to try all kinds of things to get this to work properly. First of all, the init command in the README file didn't even work. I already made one pull request that updated the init command.

Also, even before reaching this point I had to spend some time figuring out how to get it to build correctly. More specifically, I had to:

  1. add classpath 'com.google.gms:google-services:1.5.0-beta2' to root gradle file
  2. add apply plugin: 'com.google.gms.google-services' to module gradle file, and compile 'com.google.android.gms:play-services-gcm:8.3.0' under dependencies.

Are these simply not documented on README, or did I miss something?

polaski avatar Dec 19 '15 16:12 polaski

Hello @polaski , I have checked your pull request and the comments. The missing classpath, plugin and dependency are not in the readme, has to and will be fixed. However, from the way you suggest using EasyGcm.setGcmListener(this) instead of EasyGcm.init(Context context) in your pull request, it seems you might be implementing the GcmListener in a different place than the readme suggests. The EasyGcm.setGcmListener(GcmListener listener) needs you to pass an object implementing the interface whereas EasyGcm.init(Context context) requires you to implement the GcmListener in your Application class. What is the structure of the application you are using easygcm with?

Epholl avatar Dec 21 '15 12:12 Epholl