
首先,我们可以看到当前activity的入口app模块,在这个模块中的清单文件中可以找到主界面。


现在进FBReader界面

我们可以看到调用方法所执行的顺序

找到onCreate()方法

初始化三个popupwindow

对于事件的分发做出相应的action处理

在这里我们需要绑定服务

通过绑定服务,来获取我们所需要的数据。

在BookCollectionShadow这个类中,我们需要实现ServiceConnection,来获取到所需的数据端进行连接,并重写以下这两个方法


找到服务端所提供数据的类LibraryService,我们可以看到很经典的AIDL机制
点击可查看AIDL机制 http://blog.csdn.net/u011974987/article/details/51243539

继承service并重写onBind方法

最后在清单文件中注册service。
网友评论