Android 6 notifications do not reach mobile

Notifications work perfectly in iOS and Android 5 installations.

However, in Android 6, notifications only reach the mobile device when application is active.

If application is not started, notifications never reach the device.

In onesignal control panel, notification is delivered, but it is not clicked.

Is there any problem in Android 6?

Is any additional permission for Android 6?

Thank you in advance.

build.settings:

plugins = {

    [“plugin.OneSignal”] = {

        publisherId = “com.onesignal”,

  },

    – Omit if you’re using ‘plugin.googleAnalytics’

    --[“plugin.google.play.services”] = {

        – publisherId = “com.coronalabs”,

        – supportedPlatforms = { android=true, [“android-kindle”]=false },

  --},

},

androidPermissions = {

  “android.permission.INTERNET”,

  },

@joseanquiles Starting with Android 6 Google introduced a doze mode that can delay notifications around 15 minutes in some cases if the device isn’t used for a while. It will never prevent the notification from being delivered, it may just delay it.

Can you confirm this device is currently subscribed on the All Users page on the OneSignal dashboard? Try to mark it as a test device and send a notification to only that device so you can ensure the status is successful for it.

If the above looks good I recommend reviewing the guide below for debugging the issue on the device end.

https://documentation.onesignal.com/docs/notifications-show-successful-but-are-not-being-shown

Lastly I recommend contacting OneSignal support while signed into the OneSignal dashboard so they can look at your account.

Thanks.

The same problem with OneSignal on Android 6. Did you solve the problem?

@awkaw Could you post what device model you are testing with? Is it in the list in the link above? Can you also check the logcat for the entry the link lists as well?

@josh_OneSignal

Sorry for late response. From the list nothing helped - put all the permissions from https://documentation.onesignal.com/docs/notifications-show-successful-but-are-not-being-shown

06-17 18:27:47.118 V/ActivityManager( 1095): Broadcast: Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x10 mCallingUid=10010 pkg=com.example (has extras) } ordered=true userid=0 callerApp=ProcessRecord{137ce37 2264:com.google.android.gms.persistent/u0a10, isShadow:false}

06-17 18:27:47.119 W/BroadcastQueue( 1095): don’t launch com.example/10203 for broadcast Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x10 mCallingUid=10010 pkg=com.example (has extras) }

06-17 18:27:47.120 W/BroadcastQueue( 1095): don’t launch com.example/10203 for broadcast Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x10 mCallingUid=10010 pkg=com.example (has extras) }

06-17 18:27:47.123 W/GCM-DMM ( 2264): broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.example (has extras) }

Leeco Le X620, Android 6.0

Are there any ideas? :slight_smile:

The logcat entry below confirms your app was put in a force stopped state. This means most Android Intents (including FCM / GCM push) won’t be able to start the app on the device to process and display the push.

06-17 18:27:47.123 W/GCM-DMM ( 2264): broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.example (has extras) }

This is most likely due to the manufacture of that phone changing Android to force kill / stop apps after some time or from swiping the app away. We don’t have instructions for this specific brand so I recommend digging through the device setting and try disabling any battery saving options.

I recommend also trying to test your app on another device.

Thanks.

It’s strange. In WhatsApp, Fasebook and others receive push notifications. I will try. Thank you!

Manufactures will sometimes white list popular apps. Also if your app is crashing it will be put into this state.

@joseanquiles Starting with Android 6 Google introduced a doze mode that can delay notifications around 15 minutes in some cases if the device isn’t used for a while. It will never prevent the notification from being delivered, it may just delay it.

Can you confirm this device is currently subscribed on the All Users page on the OneSignal dashboard? Try to mark it as a test device and send a notification to only that device so you can ensure the status is successful for it.

If the above looks good I recommend reviewing the guide below for debugging the issue on the device end.

https://documentation.onesignal.com/docs/notifications-show-successful-but-are-not-being-shown

Lastly I recommend contacting OneSignal support while signed into the OneSignal dashboard so they can look at your account.

Thanks.

The same problem with OneSignal on Android 6. Did you solve the problem?

@awkaw Could you post what device model you are testing with? Is it in the list in the link above? Can you also check the logcat for the entry the link lists as well?

@josh_OneSignal

Sorry for late response. From the list nothing helped - put all the permissions from https://documentation.onesignal.com/docs/notifications-show-successful-but-are-not-being-shown

06-17 18:27:47.118 V/ActivityManager( 1095): Broadcast: Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x10 mCallingUid=10010 pkg=com.example (has extras) } ordered=true userid=0 callerApp=ProcessRecord{137ce37 2264:com.google.android.gms.persistent/u0a10, isShadow:false}

06-17 18:27:47.119 W/BroadcastQueue( 1095): don’t launch com.example/10203 for broadcast Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x10 mCallingUid=10010 pkg=com.example (has extras) }

06-17 18:27:47.120 W/BroadcastQueue( 1095): don’t launch com.example/10203 for broadcast Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x10 mCallingUid=10010 pkg=com.example (has extras) }

06-17 18:27:47.123 W/GCM-DMM ( 2264): broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.example (has extras) }

Leeco Le X620, Android 6.0

Are there any ideas? :slight_smile:

The logcat entry below confirms your app was put in a force stopped state. This means most Android Intents (including FCM / GCM push) won’t be able to start the app on the device to process and display the push.

06-17 18:27:47.123 W/GCM-DMM ( 2264): broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.example (has extras) }

This is most likely due to the manufacture of that phone changing Android to force kill / stop apps after some time or from swiping the app away. We don’t have instructions for this specific brand so I recommend digging through the device setting and try disabling any battery saving options.

I recommend also trying to test your app on another device.

Thanks.

It’s strange. In WhatsApp, Fasebook and others receive push notifications. I will try. Thank you!

Manufactures will sometimes white list popular apps. Also if your app is crashing it will be put into this state.