android publish/subscribe pattern
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is there a publish/subscribe pattern in android? What I want to achieve is I have this class that can notify interested party of an event. Then the interested party can do whatever it needs. Coming from a .net microsoft world, this sort of thing are build in. Do android have something similar, or I have to write some thing like an observer pattern? 回答1: I think you are speaking in terms of passing events/messages among classes within your application. So this question probably goes down to Java implementation of such a pattern. There's