我正在使用onesignal进行推送通知
implementation 'com.onesignal:OneSignal:[3.10.9, 3.99.99]'
下面在logcat中获取错误消息
E/OneSignal: OneSignal.init has not been called. Moving subscription action to a waiting task queue.
我不是什么意思。
注意:我的设备也成功注册到一个信号中,并且也收到了通知。
但仍然收到错误消息
答案 0 :(得分:0)
Try to use this dependency hope it will help you
implementation 'com.onesignal:OneSignal:3.10.6'
Add the below code snippet if didn't either in application class
or inside main activity
// OneSignal Initialization
OneSignal.startInit(this)
.setNotificationReceivedHandler(OneSignalNotificationReceiver(this))
.setNotificationOpenedHandler(OneSignalNotificationOpened(this))
.init()