I test on two devices:
- Samsung Note4 using api 23 6.0.1
- Moto G5 api 24 7.0
When I close the app The OneSignal push notifications are not received on the Samsung device but it´s received on the Moto G5 as a Notification since app is closed right.
On the Samsung I see this in logcat instead of the expected push message
08-03 13:54:03.831 3738-3738/? W/GCM-DMM: broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.port.android.debug (has extras) }
I know the result=CANCELLED error should come when app is closed by swipe or by user force killing it from setting. So this was strange surprise on the Samsung
I get the feeling this command has something to do with this:
android.os.Process.killProcess(android.os.Process.myPid());
I run the command on both devices when closing my app since I run a number of singleton daemons classes.
Any idea?