目前我有這樣的:如何打開通知組非發射活動點擊
Intent resultIntent = new Intent(context, DigestPager.class);
,這是開放DigestPager
活動(這是不發射活動)的一個通知,當點擊。
但是,當有多個通知,他們被分組到一個和摺疊,點擊它打開啓動器的活動。
是否有一些簡單的方法來打開不同的活動?
Intent resultIntent = new Intent(context, DigestPager.class);
resultIntent.putExtra("digestId", digest.getDigestId());
PendingIntent pendingIntent = PendingIntent.getActivity(this, digest.getDigestId(), resultIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
mBuilder.setContentIntent(pendingIntent);
NotificationManager mNotifyMgr = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE);
mNotifyMgr.notify(digest.getDigestId(), mBuilder.build());
你可以打開使用PendaingIntents.Try它 –
這就是我目前使用的。單擊通知單擊。 –
[點擊通知去當前活動]可能重複(http://stackoverflow.com/questions/16885706/click-on-notification-to-go-current-activity) – Kota1921