Skip to content
This repository has been archived by the owner on Mar 29, 2022. It is now read-only.

关于SubscriptionBinder绑定 #3

Closed
oksimple opened this issue Aug 20, 2016 · 2 comments
Closed

关于SubscriptionBinder绑定 #3

oksimple opened this issue Aug 20, 2016 · 2 comments
Labels

Comments

@oksimple
Copy link

你说SubscriptionBinder 可以在基类里面绑定和解绑定,为啥不直接来个默认的获取SubscriptionBinder的方法呢? 这样我不在基类里面用就很方便啦,
比如: EventBus.getDefault().register(......this);

因为有时候 需要在某些没有基类的地方获取消息

@oksimple
Copy link
Author

因为编译的问题 如果第一次 直接在 Application 中初始化 会造成 SubscriberBinderImplement.instance() 未找到。。。但是干掉之后run一把 再来初始化就ok了。。。好奇怪,这是编译时生成的?

@Sloaix
Copy link
Owner

Sloaix commented Aug 20, 2016

如果你想更加灵活的操作,可以调用Apollo.get().toXX方法,例如Observable<Object> toObservable(final String tag),这会返回一个RxJavaObservable对象,你可以自由的进行处理,当然解除订阅也需要手动操作。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants