live-event-bus-xWt**lt 上传 Java Android Live-event-bus是一款Android消息总线,它基于LiveData,具有生命周期感知能力,支持Sticky,支持AndroidX,支持跨进程,支持跨APP。这款消息总线可以在多个Activity、Fragment之间传递数据,实现数据的共享和通信。它具有以下特点: 1. 基于LiveData:LiveData是Android开发中的一种数据...
For AndroidX: implementation 'com.jeremyliao:live-event-bus-x:1.7.2' 快速开始 订阅消息 以生命周期感知模式订阅消息 LiveEventBus.get("some_key",String.class) .observe(this,newObserver<String>() {@OverridepublicvoidonChanged(@NullableStrings) { } }); ...
AndroidX implementation 'io.github.jeremyliao:live-event-bus-x:1.8.0' JCenter 非AndroidX implementation 'com.jeremyliao:live-event-bus:1.7.3' AndroidX implementation 'com.jeremyliao:live-event-bus-x:1.7.3' 快速开始 订阅消息 以生命周期感知模式订阅消息 LiveEventBus .get("some_key", ...
For AndroidX: implementation 'com.jeremyliao:live-event-bus-x:1.5.7' 配置 在Application.onCreate方法中配置: LiveEventBus .config() ... supportBroadcast配置支持跨进程、跨APP通信 lifecycleObserverAlwaysActive配置LifecycleObserver(如Activity)接收消息的模式(默认值true) ...
For AndroidX: implementation 'com.jeremyliao:live-event-bus-x:1.5.7' 配置 在Application.onCreate方法中配置: LiveEventBus .config() ... supportBroadcast配置支持跨进程、跨APP通信 lifecycleObserverAlwaysActive配置LifecycleObserver(如Activity)接收消息的模式(默认值true) ...
AndroidX implementation 'io.github.jeremyliao:live-event-bus-x:1.8.0' JCenter 非AndroidX implementation 'com.jeremyliao:live-event-bus:1.7.3' AndroidX implementation 'com.jeremyliao:live-event-bus-x:1.7.3' 快速开始 订阅消息 以生命周期感知模式订阅消息 ...
For AndroidX:implementation 'com.jeremyliao:live-event-bus-x:1.7.2' 快速开始订阅消息以生命周期感知模式订阅消息 LiveEventBus .get("some_key", String.class) .observe(this, new Observer<String>() { @Override public void onChanged(@Nullable String s) { } });以Forever模式订阅消息 ...
For AndroidX: implementation 'com.jeremyliao:live-event-bus-x:1.7.2' 快速开始 订阅消息 以生命周期感知模式订阅消息 LiveEventBus.get("some_key",String.class) .observe(this,newObserver<String>() {@OverridepublicvoidonChanged(@NullableStrings) { } }); ...
For AndroidX: implementation 'com.jeremyliao:live-event-bus-x:1.5.0' 配置 在Application.onCreate方法中配置: LiveEventBus .config() .supportBroadcast(this) .lifecycleObserverAlwaysActive(true) .autoClear(false); supportBroadcast 配置支持跨进程、跨APP通信 ...
For AndroidX: implementation 'com.jeremyliao:live-event-bus-x:1.7.2' 快速开始 订阅消息 以生命周期感知模式订阅消息 LiveEventBus.get("some_key",String.class) .observe(this,newObserver<String>() {@OverridepublicvoidonChanged(@NullableStrings) { } }); ...