Android GCM basic implementation

前端 未结 9 1907
鱼传尺愫
鱼传尺愫 2020-12-01 04:54

UPDATE: I fixed the problems in the code below so this makes a nice basic working example of how to use GCM


So, I\'m trying to im

9条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-01 04:58

    Not sure if this is related to your specific problem, however, I was experiencing the same issue. Everything was setup correctly, as far as I could tell, but the onRegistered() handler was never called.

    I had the standard onCreate(), onStart() and onDestroy() service methods as part of my GCMIntentService class. Once I removed them, the handler was called, as expected.

    My assumption is that by overriding these methods, I was by-passing needed code initialization.

提交回复
热议问题