我在我的原生 android 应用程序上设置了 onesignal。
它工作正常。当我向客户端推送消息时,推送到达,但如果应用程序打开,则会出错。
我该如何解决这个问题?
提前致谢
error is :
E/WindowManager: android.view.WindowLeaked: Activity com.ehliyet.turkiye.MainActivity has leaked window DecorView@5f4e3ba[] that was originally added here
at android.view.ViewRootImpl.<init>(ViewRootImpl.java:418)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:331)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:93)
at android.app.Dialog.show(Dialog.java:322)
at com.onesignal.GenerateNotification$1.run(GenerateNotification.java:169)
at android.app.Activity.runOnUiThread(Activity.java:5866)
at com.onesignal.GenerateNotification.showNotificationAsAlert(GenerateNotification.java:110)
at com.onesignal.GenerateNotification.fromJsonPayload(GenerateNotification.java:102)
at com.onesignal.NotificationBundleProcessor.ProcessJobForDisplay(NotificationBundleProcessor.java:96)
at com.onesignal.NotificationBundleProcessor.ProcessFromGCMIntentService(NotificationBundleProcessor.java:75)
at com.onesignal.GcmBroadcastReceiver.startGCMService(GcmBroadcastReceiver.java:128)
at com.onesignal.GcmBroadcastReceiver.processOrderBroadcast(GcmBroadcastReceiver.java:119)
at com.onesignal.GcmBroadcastReceiver.onReceive(GcmBroadcastReceiver.java:70)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3040)
at android.app.ActivityThread.-wrap18(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1561)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Application terminated.