私はAndroidアプリケーションで通知を表示するために次のコードを使用していますが、これを使用すると、アクティビティも表示されます(つまり、黒い空白の画面)この画面は必要ありませんが、単純な通知とユーザーがクリックしたとき通知後、アクティビティを開始します。このコードに何をすべきですか?
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
Notification notify = new Notification(R.drawable.mcube_logo, "Message Sent", Calendar.getInstance().getTimeInMillis());
Intent intent = new Intent(RecieveAlarm.this, otherActivity.class);
PendingIntent pendingIntent =PendingIntent.getActivity(RecieveAlarm.this, 1, null, PendingIntent.FLAG_CANCEL_CURRENT);
notify.setLatestEventInfo(RecieveAlarm.this, "Title", "Details", pendingIntent);
notificationManager.notify(0, notify);