service和activity之间除了基本的binder回调、广播机制之外,还有没有其他的一些通讯方式?
PHPz2017-04-17 17:37:55
In fact, there are not many cross-process communications in Android. In addition to the binder and broadcast mentioned by the blogger, there is another type of communication that is commonly used at the bottom level, which is socket communication.
In fact, if it spreads, there can also be communication based on contentprovider. Because the content provider can set up a listener, communication can be achieved through monitoring at this time. Of course, this is a side story. The best way is binder and broadcast. When using broadcast as an inter-process communication, you should pay attention to setting the corresponding permissions.