Opening android application has delay after clicking on OneSignal notification in android 8

こ雲淡風輕ζ 提交于 2021-02-07 14:22:41

问题


I've added oneSignal library to my android project. Everything goes right except when i click on the received notification from one signal server. it takes about one or two minute to open my android app on my device, but emulator works fine. My device is Galaxy s7 with android 8 and emulator uses android 5. I guess my android version is the issue. maybe new features on android 8 does not allow app to open immediately. Any idea?


回答1:


Finally, after a lot of searching, I found the cause. According to this article,

Several manufacturers like Sony, Asus and Samsung offer battery saver modes to extract maximum performance from the battery in their devices.

The battery saver apps put our Android apps to sleep. So, you should put your app in the UNMONITORED APPS list in android settings. In Samsung devices, the root is Settings/ Device Maintenance/ Battery/ Unmonitored apps.
Also killing the app may result in the delay of launching the app. So I recommend to not kill the app from back stack memory.
But these recommendations are for client side. And I think this is another problem!!!



来源:https://stackoverflow.com/questions/51579758/opening-android-application-has-delay-after-clicking-on-onesignal-notification-i

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!