I am testing how to use gcm today. It works fine, but I get double notifications.
What I mean about double notifications is a few minutes after the notification appeared, a second notification with the same contents as the first.
I am testing notification using GCM with PHP (Google Cloud Messaging)
I do not know where I am wrong. I am testing using emulator and real device. This is logcat debugging.
02-27 16:05:36.192: V/GCMBroadcastReceiver(513): onReceive: com.google.android.c2dm.intent.RECEIVE 02-27 16:05:36.192: V/GCMBroadcastReceiver(513): GCM IntentService class: mypackage.GCMIntentService 02-27 16:05:36.201: V/GCMBaseIntentService(513): Acquiring wakelock 02-27 16:05:36.221: V/GCMBaseIntentService(513): Intent service name: GCMIntentService-DynamicSenderIds-2 02-27 16:05:36.312: V/GCMBaseIntentService(513): Releasing wakelock . . . 02-27 16:11:14.282: V/GCMBroadcastReceiver(513): onReceive: com.google.android.c2dm.intent.RECEIVE 02-27 16:11:14.282: V/GCMBroadcastReceiver(513): GCM IntentService class: mypackage.GCMIntentService 02-27 16:11:14.291: V/GCMBaseIntentService(513): Acquiring wakelock 02-27 16:11:14.302: V/GCMBaseIntentService(513): Intent service name: GCMIntentService-DynamicSenderIds-3 02-27 16:11:14.402: V/GCMBaseIntentService(513): Releasing wakelock
user1912180
source share