-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Android: notification does not dismiss after selection button (1.6.x dev) #610
Comments
Hmm - pretty sure I have the latest as of a few hours ago. My package.json has this entry in it in: and I am downloading that using 'ionic state restore' I also checked the code in my plugins/phonegap-plugin-push directory and it looks like it has all the changes from the commit you mention. The other reason I think I'm up to date is that I was able to verify on the code I have that the bug you fixed the other day (#584) where not specifying an icon in the actions was throwing a JSON exception. |
I think I figured something out here. If my payload has a 'notId' in it, the notification does not get dismissed. 'notId' shouldn't affect the dismissal behavior should it? |
@jopelkey nope, that should work. Thanks for looking into it. I really appreciate your bugs as they are actually things I can fix. 😸 |
@jopelkey again, thanks for the excellent bug reports. I'm back from two weeks of travel so I've just pushed the fix to the 1.6 branch. |
This thread has been automatically locked. |
I am trying to get a head-start on using the 1.6.x version of the plugin, so I realize it may be 'buyer beware' at this point...
On Android, I get a push notification and it has my action buttons. When I select an action button, the callback gets called and everything appears to run ok. But the notification does not get dismissed. It should get dismissed automatically shouldn't it? I didn't think there was anything I needed to do on my end to make that happen was there? This is running with the action button set as foreground: false.
Here's the adb logcat output for the plugin at the time I hit the action button.
D/PushPlugin_BackgroundActionButtonHandler(28049): BackgroundActionButtonHandler = Bundle[mParcelledData.dataSize=1408]
D/PushPlugin_BackgroundActionButtonHandler(28049): not id = 0
D/PushPlugin(28049): convert extras to json
D/PushPlugin(28049): key = actions
D/PushPlugin(28049): key = pushPayload
D/PushPlugin(28049): key = callback
D/PushPlugin(28049): key = icon
D/PushPlugin(28049): key = notId
D/PushPlugin(28049): key = title
D/PushPlugin(28049): key = message
D/PushPlugin(28049): key = coldstart
D/PushPlugin(28049): key = collapse_key
D/PushPlugin(28049): key = foreground
V/PushPlugin(28049): extrasToJSON: {"title":"Mobile Auth","message":"Some tenant name\nLogin Verification\nsome.tenant.com","additionalData":{"actions":[{"callback":"window.rejectVerification","foreground":false,"title":"Reject"},{"callback":"window.acceptVerification","foreground":false,"title":"Accept"}],"pushPayload":{"request":{"loginUri":"sendMsg.fake.com","tenantName":"sendMsg.js fake tenant","responseUri":"responseUri","requestTimestamp":1455305073,"requestId":4058401,"tenantId":"tenantId","userId":"userId","uri":"uri"},"authenticatorId":"authId"},"callback":"window.acceptVerification","icon":"ic_launcher","notId":"1455305073","coldstart":false,"collapse_key":"do_not_collapse","foreground":false}}
The text was updated successfully, but these errors were encountered: