Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

[Android 5.0] Notifications not getting through when app is not running #748

Closed
ghost opened this issue Mar 23, 2016 · 2 comments
Closed

Comments

@ghost
Copy link

ghost commented Mar 23, 2016

Expected Behaviour

Showing a notification on the system panel.

Actual Behaviour

When the app is not running and I send a push notification through GCM, it gets to the phone but its rejected on logcat. Nothing happens.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

force close the app and send a push notification on GCM.

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

Android 5.0
Zenfone 2 ZE551ML (stock rom)

(Android) What device vendor (e.g. Samsung, HTC, Sony...)

Cordova CLI version and cordova platform version

cordova                              6.0.0
platform android                     5.1.1

Plugin version

phonegap-plugin-push  1.6.0

Sample Push Data Payload

Sample Code that illustrates the problem

My server side GCM generation code (using gcm-node and coffeescript):

  sender = new gcm.Sender(settings.gcm.API_KEY)
  message = new gcm.Message()
  message.addData 'title', 'testing'
  message.addData 'message', 'some test msg'
  message.addData 'content-available', 1
  message.addData 'priority', 2
  receivers =
    registrationTokens: [...]
  sender.send message, receivers, callback

Logs taken while reproducing problem

I/GCM     (19955): GCM message com.app.test.mobile 0:1458748156761978%e60cf8f4f9fd7ecd
W/BroadcastQueue(  673): Reject to launch app com.app.test.mobile/10241 for broadcast: App Op 48
W/GCM-DMM (19955): broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.app.test.mobile (has extras) }

@macdonst
Copy link
Member

@s4lesman I believe it to be a duplicate of #158. Please add details to that issue.

@lock
Copy link

lock bot commented Jun 5, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

1 participant