我希望在單擊通知時啓動主活動。即使用戶不在應用程序中也是如此。我該怎麼做?單擊通知發起活動
NotificationCompat.Builder mBuilder =new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.diamond)
.setContentTitle("Crystallise")
.setContentText("making your thoughts crystal clear");
NotificationManager mNotificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.notify(notifyID, mBuilder.build());