-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Android: action buttons not showing in notification if icon is not specified #584
Comments
I added some debugging to the plugin and realized that sending actions without an icon specified does not work. i.e. when sending these actions [{ adding the 1st callback ends up throwing the following exception: The current documentation implies that the icon is optional. And indeed if I supply a bogus icon name, then I get buttons. So - I can work around this for now, but seems like the icon attribute in the actions list should really be optional. |
@jopelkey you are right, I will fix. |
@jopelkey thanks for the detailed but report. The issue has been fixed and will be in the 1.6.0 release. |
This thread has been automatically locked. |
I am trying to get action buttons working on the push using the version 1.5.3 of the push plugin on Android and can't seem to get the buttons to show. I am getting the push notification - just no buttons.
My config as passed to the init call just has a senderID:
config = {
"android" : {
"senderID": "111111111111",
}
}
I am using node-gcm to send the push. The message that is getting sent from node-gcm looks like:
{
"params": {
"data": {
"actions": [
{
"callback": "window.rejectVerification",
"title": "Reject"
},
{
"callback": "window.acceptVerification",
"title": "Accept"
}
],
"message": "My message",
"notId": 1454718550,
"title": "My Title"
},
"delayWhileIdle": false,
"priority": "high",
"timeToLive": 300
}
}
output from: adb logcat | grep PushPlugin
(Why do I only see the logging for one of the actions and not the second one? Wondering if there is a failure at this point that is causing the actions to not get set up properly...)
V/PushPlugin( 6057): execute: action=init
V/PushPlugin( 6057): execute: data=[{"android":{"senderID":"947243259468"}}]
V/PushPlugin( 6057): execute: jo={"senderID":"947243259468"}
V/PushPlugin( 6057): execute: senderID=947243259468
V/PushPlugin( 6057): onRegistered: {"registrationId":"myId here"}
D/PushPlugin( 6057): no icon option
D/PushPlugin( 6057): no iconColor option
D/PushPlugin_GCMIntentService( 6057): onMessage - from: 947243259468
D/PushPlugin_GCMIntentService( 6057): normalize extras
D/PushPlugin_GCMIntentService( 6057): key = actions
D/PushPlugin_GCMIntentService( 6057): replace key actions with actions
D/PushPlugin_GCMIntentService( 6057): key = notId
D/PushPlugin_GCMIntentService( 6057): replace key notId with notId
D/PushPlugin_GCMIntentService( 6057): key = title
D/PushPlugin_GCMIntentService( 6057): replace key title with title
D/PushPlugin_GCMIntentService( 6057): key = message
D/PushPlugin_GCMIntentService( 6057): replace key message with message
D/PushPlugin_GCMIntentService( 6057): key = collapse_key
D/PushPlugin_GCMIntentService( 6057): replace key collapse_key with collapse_key
D/PushPlugin_GCMIntentService( 6057): background
D/PushPlugin_GCMIntentService( 6057): message =[My message]
D/PushPlugin_GCMIntentService( 6057): title =[My Title]
D/PushPlugin_GCMIntentService( 6057): contentAvailable =[null]
D/PushPlugin_GCMIntentService( 6057): create notification
D/PushPlugin_GCMIntentService( 6057): stored icon=android_push
D/PushPlugin_GCMIntentService( 6057): stored iconColor=#53bbd4
D/PushPlugin_GCMIntentService( 6057): stored sound=true
D/PushPlugin_GCMIntentService( 6057): stored vibrate=true
D/PushPlugin_GCMIntentService( 6057): using icon from plugin options
D/PushPlugin_GCMIntentService( 6057): no icon resource found - using application icon
D/PushPlugin_GCMIntentService( 6057): create actions
D/PushPlugin_GCMIntentService( 6057): adding action
D/PushPlugin_GCMIntentService( 6057): adding callback = window.rejectVerification
I am using:
The text was updated successfully, but these errors were encountered: