Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我的应用程序终止时,我需要取消重复警报。问题是我有几个活动,因为它们可以随时被杀死,我如何确定最后一个活动何时被关闭,以便我可以调用我的警报取消方法?
没有 100% 可靠的方法。你能做的最好的事情是 subclassApplication和 override onTerminate()。
Application
onTerminate()