简体   繁体   中英

Opening android application has delay after clicking on OneSignal notification in 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.

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!!!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM