通知をクリックすると、アプリケーションでアクティビティの 1 つを開始したいと思います。リンクNotificationsで説明されているように、保留中のインテントを設計しました。しかし、通知をクリックすると、アクティビティが起動されますが、それはアプリケーションから起動するはずのアクティビティではありません。私のアクティビティと同じクラス名を持つアクティビティだけが起動されます。アクティビティにブレーク ポイントを設定しましたが、ブレーク ポイントに到達しません。なにが問題ですか?NotificationListActivity は、私が起動したいものです。NotificationListActivity というタイトルのアクティビティが開始されましたが、私のアクティビティではありません。
Intent resultIntent = new Intent(thisclasscontext, NotificationListActivity.class);
resultIntent.putExtra("MOBILENUMBER", tel);
TaskStackBuilder stackBuilder = TaskStackBuilder.create(thisclasscontext);
// Adds the back stack for the Intent (but not the Intent itself)
stackBuilder.addParentStack(NotificationListActivity.class);
// Adds the Intent that starts the Activity to the top of the stack
stackBuilder.addNextIntent(resultIntent);
PendingIntent resultPendingIntent = stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT);
mBuilder.setContentIntent(resultPendingIntent);