1
私は、通知を作成するためのコードがあります。各通知の新しいアクティビティオブジェクトはどのようにすることができますか?
NotificationManager notifyMngr=(NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
Notification notification=new Notification(mId, "New alert!", System.currentTimeMillis());
Intent alert = new Intent(this, AlertInfoActivity.class);
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, alert, 0);
notification.setLatestEventInfo(this, data.get("name"), data.get("post_date"), contentIntent);
notifyMngr.notify((int) System.currentTimeMillis(), notification);
を私はいくつかの通知を作成する必要があり、各通知はクリックでAlertInfoActivityの新しいオブジェクトを実行する必要があります。しかし、このコードは1つのアクティビティオブジェクトを常に実行します。どのように私の仕事をすることができますか?
ユーザーが1つの通知をクリックしたときに複数のアクティビティを実行したいですか? –
番号。私はいくつかの通知を実行します。 – user975290