Android: Does context affect filterEquals(), used to cancel alarm?
要取消警报,我使用
如果它比较2个使用不同上下文构造的pendingIntent,并且它们使用的intent也具有不同的上下文,但是它们引用的类相同,则filterEquals(Intent)返回true吗?
因此,pendingIntent1具有:context1和具有context1和class1.class
的意图
andendingIntent2具有:context2和具有context2和class1.class
的意图
预先感谢!
我认为它们应该相同。据此,仅需要上下文来检索应用程序的程序包名称。