单击android 8中的OneSignal通知后,打开android应用程序存在延迟
我已将 oneSignal
库添加到我的android项目中.一切正常,除了当我单击从一台信号服务器收到的通知时.在我的设备上打开我的android应用大约需要一到两分钟,但是模拟器可以正常运行.我的设备是带有android 8的Galaxy s7,并且模拟器使用android5.我想我的android版本是问题.也许android 8的新功能不允许应用立即打开.有什么主意吗?
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?
最后,经过大量搜索,我找到了原因.根据本文,
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.
省电应用程序使我们的Android应用程序进入睡眠状态.因此,您应该将您的应用放入android设置中的UNMONITORED APPS列表中.在Samsung设备中,根目录是设置"/设备维护"/电池"/不受监视的应用程序".
也,杀死该应用程序可能会导致启动该应用程序的延迟.因此,我建议不要从后堆栈内存中杀死该应用程序.
但是这些建议是针对客户端的.而且我认为这是另一个问题!!!
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!!!