Android:GCM PendingEvent在三星note 2中不起作用
我可以在所有设备中接收gcm通知。但是,当我单击通知时,它并没有导航到我在意图中给出的相应活动。我没有为这一意图设置任何标志 它在所有其他设备中工作正常 这是我的密码Android:GCM PendingEvent在三星note 2中不起作用,android,google-cloud-messaging,Android,Google Cloud Messaging,我可以在所有设备中接收gcm通知。但是,当我单击通知时,它并没有导航到我在意图中给出的相应活动。我没有为这一意图设置任何标志 它在所有其他设备中工作正常 这是我的密码 Intent notificationIntent = new Intent(GcmIntentService.this, NotificationActivity.class); PendingIntent contentIntent = PendingIntent.getActivity(GcmIntentService.
Intent notificationIntent = new Intent(GcmIntentService.this, NotificationActivity.class);
PendingIntent contentIntent = PendingIntent.getActivity(GcmIntentService.this, 0, notificationIntent, 0);
mBuilder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.gcm)
.setContentTitle("New messages")
.setStyle(new NotificationCompat.BigTextStyle()
.bigText(msg))
.setDefaults(Notification.DEFAULT_SOUND)
.setContentText(msg);
mBuilder.setContentIntent(contentIntent);
mBuilder.setAutoCancel(true);
mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());
我的舱单
<receiver
android:name="mellotv.com.gcm.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.example.gcm" />
</intent-filter>
</receiver>
我已经检查了设备api,它是19
有人能帮我解决这个问题吗