-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
这个库挺好的~ #6
Comments
还有一个问题,有些 SDK 提供的是方法调用来切换环境,貌似目前 |
这个问题,可以通过调用 EnvironmentSwitcher.addOnEnvironmentChangeListener 添加监听事件,然后在回调中切换 SDK 的环境。例如“直播”模块是引用的SDK,可以这样写: EnvironmentConfig.java:
YourApplication.java或其他类:
如果在不是整个生命周期都存在的类中添加监听,不要忘了在类销毁前移除监听事件,否则会造成内存泄漏。 |
快速切换功能,我有时间会考虑一下可行度和必要性的。感谢你的建议。😄 |
赞,第二个问题解了 |
我想了一下,这个快速切换可能确实优先级没那么高,需要测哪个模块,把对应模块切到对应环境就好了 😄 |
而且我也没想出什么好的实现的方式。 |
纠结了好久,感觉用 addListener 的方式貌似是最好的了。。。issue 关了吧。thks |
这个库挺好的。我们项目里也有测试配置页,我有一些疑问,描述如下:
The text was updated successfully, but these errors were encountered: