Our application is getting the FirebaseInstanceId
with the following code :
(我们的应用程序使用以下代码获取FirebaseInstanceId
:)
Observable.create<ReactiveStreamResult> {
it.onNext(FirebaseInstanceId.getInstance()
.getToken(SENDER_ID, FirebaseMessaging.INSTANCE_ID_SCOPE)
)
}
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
But for some device this code triggered an IOException
(MAIN_THREAD).
(但是对于某些设备,此代码触发了IOException
(MAIN_THREAD)。)
Is it possible that the creation of the observable is done on the MAIN_THREAD
not on the IO Thread
? (是否可以在MAIN_THREAD
而不是在IO Thread
上创建可观察对象?)
Can the defer operator solve this issue ?
(延迟运算符可以解决此问题吗?)
Thank you for your answer Best Regards
(谢谢您的回答最好的问候)
Guillaume
(纪尧姆)
ask by Shindra translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…