alarmManager.cancel(pendingIntent);
Android開発者によると、アラームをキャンセルするには、 which を使用しますRemoves any alarms with a matching Intent. Any alarm, of any type, whose Intent matches this one (as defined by filterEquals(Intent)), will be canceled.
異なるコンテキストで構築された 2 つの pendingIntent を比較し、それらが使用するインテントも異なるコンテキストを持ちますが、それらが参照するクラスは同じである場合、filterEquals(Intent) は true を返しますか?
したがって、pendingIntent1 には、context1 と、context1 および class1.class を含むインテントがあります。
そして pendingIntent2 には、context2 と、context2 と class1.class を持つインテントがあります。
前もって感謝します!