{"action":"created","issue":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/1271","repository_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push","labels_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/1271/labels{/name}","comments_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/1271/comments","events_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/1271/events","html_url":"https://github.com/phonegap/phonegap-plugin-push/issues/1271","id":181708718,"number":1271,"title":"Only the last Android action button event is cached when the app is running in the background","user":{"login":"mikepsinn","id":2808553,"avatar_url":"https://avatars.githubusercontent.com/u/2808553?v=3","gravatar_id":"","url":"https://api.github.com/users/mikepsinn","html_url":"https://github.com/mikepsinn","followers_url":"https://api.github.com/users/mikepsinn/followers","following_url":"https://api.github.com/users/mikepsinn/following{/other_user}","gists_url":"https://api.github.com/users/mikepsinn/gists{/gist_id}","starred_url":"https://api.github.com/users/mikepsinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikepsinn/subscriptions","organizations_url":"https://api.github.com/users/mikepsinn/orgs","repos_url":"https://api.github.com/users/mikepsinn/repos","events_url":"https://api.github.com/users/mikepsinn/events{/privacy}","received_events_url":"https://api.github.com/users/mikepsinn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/labels/android","name":"android","color":"BFD4F2"},{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-10-07T16:08:27Z","updated_at":"2016-10-14T16:33:03Z","closed_at":null,"body":"### Expected Behaviour\r\nAll action button presses should be cached and actions should be executed when the app is started.\r\n\r\n### Actual Behaviour\r\nEach button press overwrites the previously cached action. \r\n\r\n### Reproduce Scenario (including but not limited to)\r\n\r\n#### Steps to Reproduce \r\nCreate some notifications with action buttons and callbacks in your app.  Kill the app. Send multiple notifications.  Press buttons on each one. Open the app and watch the logs and you'll see that only the most recent action button press's action callback is executed.\r\n\r\n#### Platform and Version (eg. Android 5.0 or iOS 9.2.1)\r\nAndroid (All versions probably)\r\n\r\n#### (Android) What device vendor (e.g. Samsung, HTC, Sony...)\r\nSamsung (but probably all)\r\n\r\n#### Cordova CLI version and cordova platform version\r\n\r\n    cordova --version                                    # e.g. 6.0.0\r\n    cordova platform version android                     # e.g. 4.1.1\r\n\r\nCordova CLI: 6.2.0\r\nGulp version:  CLI version 3.9.1\r\nGulp local:   Local version 3.9.1\r\nIonic Framework Version: 1.3.1\r\nIonic CLI Version: 1.7.16\r\nIonic App Lib Version: 0.7.3\r\nOS:\r\nNode Version: v4.4.5\r\n\r\n\r\n#### Plugin version\r\n\r\n1.8.2\r\n\r\n#### (Android) What device vendor (e.g. Samsung, HTC, Sony...)\r\n\r\nSamsung Galaxy S6\r\nNexus 5X\r\n\r\n#### Cordova CLI version and cordova platform version\r\nCordova CLI: 6.0.0\r\nGulp version:  CLI version 3.9.1\r\nGulp local:   Local version 3.9.1\r\nIonic Framework Version: 1.3.1\r\nIonic CLI Version: 1.7.16\r\nIonic App Lib Version: 0.7.3\r\nOS: Distributor ID:\tUbuntu Description:\tUbuntu 14.04.5 LTS \r\nNode Version: v6.4.0\r\n\r\nInstalled platforms: android 5.1.1\r\n\r\n#### Sample Push Data Payload\r\n\r\n```\r\n{\r\n   \"message\":\"Pull down and select a value to record or tap to open inbox for more options\",\r\n   \"title\":\"Track Aerobic Exercise\",\r\n   \"soundname\":false,\r\n   \"color\":\"#2196F3\",\r\n   \"user\":230,\r\n   \"image\":\"\",\r\n   \"msgcnt\":725,\r\n   \"lastValue\":60,\r\n   \"secondToLastValue\":30,\r\n   \"thirdToLastValue\":20,\r\n   \"trackingReminderNotificationId\":1242279,\r\n   \"notId\":1242279,\r\n   \"actions\":\"[{\\\"title\\\":\\\"60 min\\\",\\\"callback\\\":\\\"trackLastValueAction\\\",\\\"foreground\\\":false},{\\\"title\\\":\\\"30 min\\\",\\\"callback\\\":\\\"trackSecondToLastValueAction\\\",\\\"foreground\\\":false},{\\\"title\\\":\\\"20 min\\\",\\\"callback\\\":\\\"trackThirdToLastValueAction\\\",\\\"foreground\\\":false}]\"\r\n}\r\n```\r\n```\r\n{\r\n   \"message\":\"Pull down and select a value to record or tap to open inbox for more options\",\r\n   \"title\":\"Track Extra Virgin Olive Oil\",\r\n   \"soundname\":false,\r\n   \"color\":\"#2196F3\",\r\n   \"user\":230,\r\n   \"image\":\"\",\r\n   \"msgcnt\":725,\r\n   \"lastValue\":2,\r\n   \"secondToLastValue\":0,\r\n   \"thirdToLastValue\":null,\r\n   \"trackingReminderNotificationId\":1242140,\r\n   \"notId\":1242140,\r\n   \"actions\":\"[{\\\"title\\\":\\\"2 serving\\\",\\\"callback\\\":\\\"trackLastValueAction\\\",\\\"foreground\\\":false},{\\\"title\\\":\\\"0 serving\\\",\\\"callback\\\":\\\"trackSecondToLastValueAction\\\",\\\"foreground\\\":false},{\\\"title\\\":\\\"Snooze\\\",\\\"callback\\\":\\\"snoozeAction\\\",\\\"foreground\\\":false}]\"\r\n}\r\n```\r\n\r\n```\r\n{\r\n   \"message\":\"Pull down and select a value to record or tap to open inbox for more options\",\r\n   \"title\":\"Track Overall Mood\",\r\n   \"soundname\":false,\r\n   \"color\":\"#2196F3\",\r\n   \"user\":230,\r\n   \"image\":\"\",\r\n   \"msgcnt\":725,\r\n   \"lastValue\":3,\r\n   \"secondToLastValue\":1,\r\n   \"thirdToLastValue\":5,\r\n   \"trackingReminderNotificationId\":1245670,\r\n   \"notId\":1245670,\r\n   \"actions\":\"[{\\\"title\\\":\\\"Rate 3\\\\/5\\\",\\\"callback\\\":\\\"trackThreeRatingAction\\\",\\\"foreground\\\":false},{\\\"title\\\":\\\"Rate 1\\\\/5\\\",\\\"callback\\\":\\\"trackOneRatingAction\\\",\\\"foreground\\\":false},{\\\"title\\\":\\\"Rate 5\\\\/5\\\",\\\"callback\\\":\\\"trackFiveRatingAction\\\",\\\"foreground\\\":false}]\"\r\n}\r\n```\r\n#### Sample Code that illustrates the problem\r\n\r\n```\r\n$ionicPlatform.ready(function() {\r\n\r\n         if (ionic.Platform.isAndroid() || ionic.Platform.isIPad() || ionic.Platform.isIOS()) {\r\n             console.debug(\"Going to try to register push\");\r\n             var push = PushNotification.init({\r\n                 android: {\r\n                     senderID: \"1052648855194\",\r\n                     badge: true,\r\n                     sound: false,\r\n                     vibrate: false,\r\n                     icon: 'ic_stat_icon_bw',\r\n                     clearBadge: true\r\n                 },\r\n                 browser: {\r\n                     pushServiceURL: 'http://push.api.phonegap.com/v1/push'\r\n                 },\r\n                 ios: {\r\n                     alert: \"false\",\r\n                     badge: \"true\",\r\n                     sound: \"false\",\r\n                     clearBadge: true\r\n                 },\r\n                 windows: {}\r\n             });\r\n\r\n             push.on('registration', function(registerResponse) {\r\n                 console.debug('Registered device for push notifications: ' + JSON.stringify(registerResponse));\r\n                 // data.registrationId\r\n                 var newDeviceToken = registerResponse.registrationId;\r\n                 console.debug(\"Got device token for push notifications: \" + registerResponse.registrationId);\r\n                 var deviceTokenOnServer = localStorageService.getItemSync('deviceTokenOnServer');\r\n                 console.debug('deviceTokenOnServer from localStorage is ' + deviceTokenOnServer);\r\n                 if(deviceTokenOnServer !== registerResponse.registrationId) {\r\n                     localStorageService.setItem('deviceTokenToSync', newDeviceToken);\r\n                     console.debug('New push device token does not match push device token on server so saving to localStorage to sync after login');\r\n                 }\r\n             });\r\n\r\n             var finishPushes = true;  // Setting to false didn't solve notification dismissal problem\r\n\r\n             push.on('notification', function(data) {\r\n                 console.log('Received push notification: ' + JSON.stringify(data));\r\n                 qmLocationService.updateLocationVariablesAndPostMeasurementIfChanged();\r\n                 reminderService.refreshTrackingReminderNotifications();\r\n                 // data.message,\r\n                 // data.title,\r\n                 // data.count,\r\n                 // data.sound,\r\n                 // data.image,\r\n                 // data.additionalData\r\n                 if(!finishPushes) {\r\n                     console.log('Not doing push.finish for data.additionalData.notId: ' + data.additionalData.notId);\r\n                     return;\r\n                 }\r\n                 push.finish(function () {\r\n                     console.log(\"processing of push data is finished: \" + JSON.stringify(data));\r\n                 });\r\n             });\r\n\r\n             push.on('error', function(e) {\r\n                 alert(e.message);\r\n             });\r\n\r\n             var finishPush = function (data) {\r\n                 if(!finishPushes){\r\n                     console.log('Not doing push.finish for data.additionalData.notId: ' + data.additionalData.notId);\r\n                     return;\r\n                 }\r\n\r\n                 push.finish(function() {\r\n                     console.log('accept callback finished for data.additionalData.notId: ' + data.additionalData.notId);\r\n                 }, function() {\r\n                     console.log('accept callback failed for data.additionalData.notId: ' + data.additionalData.notId);\r\n                 }, data.additionalData.notId);\r\n\r\n             };\r\n\r\n             window.trackOneRatingAction = function (data){\r\n                 \r\n                 console.log(\"trackDefaultValueAction Push data: \" + JSON.stringify(data));\r\n                 var body = {\r\n                     trackingReminderNotificationId: data.additionalData.trackingReminderNotificationId,\r\n                     modifiedValue: 1\r\n                 };\r\n\r\n                 reminderService.trackReminderNotification(body);\r\n                 finishPush(data);\r\n             };\r\n\r\n             window.trackTwoRatingAction = function (data){\r\n                 \r\n                 console.log(\"trackDefaultValueAction Push data: \" + JSON.stringify(data));\r\n                 var body = {\r\n                     trackingReminderNotificationId: data.additionalData.trackingReminderNotificationId,\r\n                     modifiedValue: 2\r\n                 };\r\n\r\n                 reminderService.trackReminderNotification(body);\r\n                 finishPush(data);\r\n             };\r\n\r\n             window.trackThreeRatingAction = function (data){\r\n                 \r\n                 console.log(\"trackDefaultValueAction Push data: \" + JSON.stringify(data));\r\n                 var body = {\r\n                     trackingReminderNotificationId: data.additionalData.trackingReminderNotificationId,\r\n                     modifiedValue: 3\r\n                 };\r\n\r\n                 reminderService.trackReminderNotification(body);\r\n                 finishPush(data);\r\n             };\r\n\r\n             window.trackFourRatingAction = function (data){\r\n                 \r\n                 console.log(\"trackDefaultValueAction Push data: \" + JSON.stringify(data));\r\n                 var body = {\r\n                     trackingReminderNotificationId: data.additionalData.trackingReminderNotificationId,\r\n                     modifiedValue: 4\r\n                 };\r\n\r\n                 reminderService.trackReminderNotification(body);\r\n                 finishPush(data);\r\n             };\r\n\r\n             window.trackFiveRatingAction = function (data){\r\n                 \r\n                 console.log(\"trackDefaultValueAction Push data: \" + JSON.stringify(data));\r\n                 var body = {\r\n                     trackingReminderNotificationId: data.additionalData.trackingReminderNotificationId,\r\n                     modifiedValue: 5\r\n                 };\r\n\r\n                 reminderService.trackReminderNotification(body);\r\n                 finishPush(data);\r\n             };\r\n\r\n             window.trackDefaultValueAction = function (data){\r\n                 \r\n                 console.log(\"trackDefaultValueAction Push data: \" + JSON.stringify(data));\r\n                 var body = {\r\n                     trackingReminderNotificationId: data.additionalData.trackingReminderNotificationId\r\n                 };\r\n\r\n                 reminderService.trackReminderNotification(body);\r\n                 finishPush(data);\r\n             };\r\n\r\n             window.snoozeAction = function (data){\r\n                 \r\n                 console.log(\"snoozeAction push data: \" + JSON.stringify(data));\r\n                 var body = {\r\n                     trackingReminderNotificationId: data.additionalData.trackingReminderNotificationId\r\n                 };\r\n                 reminderService.snoozeReminderNotification(body);\r\n                 finishPush(data);\r\n             };\r\n\r\n             window.trackLastValueAction = function (data){\r\n                 \r\n                 console.log(\"trackLastValueAction Push data: \" + JSON.stringify(data));\r\n                 var body = {\r\n                     trackingReminderNotificationId: data.additionalData.trackingReminderNotificationId,\r\n                     modifiedValue: data.additionalData.lastValue\r\n                 };\r\n                 reminderService.trackReminderNotification(body);\r\n                 finishPush(data);\r\n             };\r\n\r\n             window.trackSecondToLastValueAction = function (data){\r\n                 \r\n                 console.log(\"trackSecondToLastValueAction Push data: \" + JSON.stringify(data));\r\n                 var body = {\r\n                     trackingReminderNotification: data.additionalData.trackingReminderNotificationId,\r\n                     modifiedValue: data.additionalData.secondToLastValue\r\n                 };\r\n                 reminderService.trackReminderNotification(body);\r\n                 finishPush(data);\r\n             };\r\n\r\n             window.trackThirdToLastValueAction = function (data){\r\n                 \r\n                 console.log(\"trackThirdToLastValueAction Push data: \" + JSON.stringify(data));\r\n                 var body = {\r\n                     trackingReminderNotificationId: data.additionalData.trackingReminderNotificationId,\r\n                     modifiedValue: data.additionalData.thirdToLastValue\r\n                 };\r\n                 reminderService.trackReminderNotification(body);\r\n                 finishPush(data);\r\n             };\r\n         }\r\n\r\n    });\r\n\r\n```\r\n\r\n#### Logs taken while reproducing problem\r\n\r\n```\r\n10-07 11:05:47.089 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: onMessage - from: 1052648855194\r\n10-07 11:05:47.089 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: normalize extras\r\n10-07 11:05:47.089 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = google.sent_time\r\n10-07 11:05:47.089 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: replace key google.sent_time with google.sent_time\r\n10-07 11:05:47.089 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data\r\n10-07 11:05:47.089 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: extracting nested message data from key = data\r\n10-07 11:05:47.089 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/image\r\n10-07 11:05:47.089 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/lastValue\r\n10-07 11:05:47.089 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/color\r\n10-07 11:05:47.089 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/trackingReminderNotificationId\r\n10-07 11:05:47.089 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/thirdToLastValue\r\n10-07 11:05:47.089 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/message\r\n10-07 11:05:47.089 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: no locale found for key = message, error Value Pull of type java.lang.String cannot be converted to JSONObject\r\n10-07 11:05:47.099 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/title\r\n10-07 11:05:47.099 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: no locale found for key = title, error Value Track of type java.lang.String cannot be converted to JSONObject\r\n10-07 11:05:47.099 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/notId\r\n10-07 11:05:47.099 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/msgcnt\r\n10-07 11:05:47.099 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/secondToLastValue\r\n10-07 11:05:47.099 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/soundname\r\n10-07 11:05:47.099 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/user\r\n10-07 11:05:47.099 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/actions\r\n10-07 11:05:47.099 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: replace key data with data\r\n10-07 11:05:47.099 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = title\r\n10-07 11:05:47.099 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: replace key title with title\r\n10-07 11:05:47.099 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: no locale found for key = title, error Value Track of type java.lang.String cannot be converted to JSONObject\r\n10-07 11:05:47.099 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = google.message_id\r\n10-07 11:05:47.099 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: replace key google.message_id with google.message_id\r\n10-07 11:05:47.099 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = is_background\r\n10-07 11:05:47.099 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: replace key is_background with is_background\r\n10-07 11:05:47.099 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = collapse_key\r\n10-07 11:05:47.099 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: replace key collapse_key with collapse_key\r\n10-07 11:05:47.129 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: background\r\n10-07 11:05:47.129 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: count =[2]\r\n10-07 11:05:47.129 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: message =[Pull down and select a value to record or tap to open inbox for more options]\r\n10-07 11:05:47.129 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: title =[Track Overall Mood]\r\n10-07 11:05:47.129 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: contentAvailable =[null]\r\n10-07 11:05:47.129 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: create notification\r\n10-07 11:05:47.179 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: stored icon=ic_stat_icon_bw\r\n10-07 11:05:47.179 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: stored iconColor=null\r\n10-07 11:05:47.179 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: stored sound=false\r\n10-07 11:05:47.179 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: stored vibrate=false\r\n10-07 11:05:47.179 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: using icon from plugin options\r\n10-07 11:05:47.189 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: count =[2]\r\n10-07 11:05:47.189 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: create actions: with in-line\r\n10-07 11:05:47.189 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: adding action\r\n10-07 11:05:47.189 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: adding callback = trackTwoRatingAction\r\n10-07 11:05:47.189 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: adding action\r\n10-07 11:05:47.189 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: adding callback = trackOneRatingAction\r\n10-07 11:05:47.189 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: adding action\r\n10-07 11:05:47.189 14683-14720/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: adding callback = trackThreeRatingAction\r\n10-07 11:05:47.269 4644-19999/? W/ResourcesManager: getTopLevelResources: /data/app/com.quantimodo.medtlcapp-2/base.apk / 1.0 running in com.pushbullet.android rsrc of package com.quantimodo.medtlcapp\r\n10-07 11:05:51.869 3137-23334/? D/ExynosCamera: [CAM_ID(1)][]-DEBUG(m_setupFrameFactory[839]):setupFrameFactory pushProcessQ(0)\r\n10-07 11:05:52.339 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: onMessage - from: 1052648855194\r\n10-07 11:05:52.339 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: normalize extras\r\n10-07 11:05:52.339 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = google.sent_time\r\n10-07 11:05:52.339 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: replace key google.sent_time with google.sent_time\r\n10-07 11:05:52.339 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data\r\n10-07 11:05:52.339 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: extracting nested message data from key = data\r\n10-07 11:05:52.339 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/image\r\n10-07 11:05:52.339 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/lastValue\r\n10-07 11:05:52.339 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/color\r\n10-07 11:05:52.339 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/trackingReminderNotificationId\r\n10-07 11:05:52.339 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/thirdToLastValue\r\n10-07 11:05:52.339 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/message\r\n10-07 11:05:52.339 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: no locale found for key = message, error Value Pull of type java.lang.String cannot be converted to JSONObject\r\n10-07 11:05:52.339 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/title\r\n10-07 11:05:52.339 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: no locale found for key = title, error Value Track of type java.lang.String cannot be converted to JSONObject\r\n10-07 11:05:52.339 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/notId\r\n10-07 11:05:52.339 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/msgcnt\r\n10-07 11:05:52.349 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/secondToLastValue\r\n10-07 11:05:52.349 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/soundname\r\n10-07 11:05:52.349 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/user\r\n10-07 11:05:52.349 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = data/actions\r\n10-07 11:05:52.349 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: replace key data with data\r\n10-07 11:05:52.349 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = title\r\n10-07 11:05:52.349 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: replace key title with title\r\n10-07 11:05:52.349 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: no locale found for key = title, error Value Track of type java.lang.String cannot be converted to JSONObject\r\n10-07 11:05:52.349 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = google.message_id\r\n10-07 11:05:52.349 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: replace key google.message_id with google.message_id\r\n10-07 11:05:52.349 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = is_background\r\n10-07 11:05:52.349 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: replace key is_background with is_background\r\n10-07 11:05:52.349 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: key = collapse_key\r\n10-07 11:05:52.349 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: replace key collapse_key with collapse_key\r\n10-07 11:05:52.349 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: background\r\n10-07 11:05:52.349 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: count =[2]\r\n10-07 11:05:52.349 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: message =[Pull down and select a value to record or tap to open inbox for more options]\r\n10-07 11:05:52.349 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: title =[Track Berberine Plus by Best Naturals]\r\n10-07 11:05:52.349 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: contentAvailable =[null]\r\n10-07 11:05:52.349 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: create notification\r\n10-07 11:05:52.359 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: stored icon=ic_stat_icon_bw\r\n10-07 11:05:52.359 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: stored iconColor=null\r\n10-07 11:05:52.359 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: stored sound=false\r\n10-07 11:05:52.359 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: stored vibrate=false\r\n10-07 11:05:52.359 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: using icon from plugin options\r\n10-07 11:05:52.359 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: count =[2]\r\n10-07 11:05:52.359 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: create actions: with in-line\r\n10-07 11:05:52.359 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: adding action\r\n10-07 11:05:52.359 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: adding callback = trackLastValueAction\r\n10-07 11:05:52.359 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: adding action\r\n10-07 11:05:52.359 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: adding callback = trackSecondToLastValueAction\r\n10-07 11:05:52.369 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: adding action\r\n10-07 11:05:52.369 14683-14868/com.quantimodo.medtlcapp D/PushPlugin_GCMIntentService: adding callback = snoozeAction\r\n10-07 11:06:03.689 14683-14683/com.quantimodo.medtlcapp D/PushPlugin_BackgroundActionButtonHandler: BackgroundActionButtonHandler = Bundle[mParcelledData.dataSize=2948]\r\n```\r\nHere's where I press a the first notification's (notId 5926114) button:\r\n```\r\n10-07 11:06:03.689 14683-14683/com.quantimodo.medtlcapp D/PushPlugin_BackgroundActionButtonHandler: not id = 5926114\r\n10-07 11:06:03.719 14683-14683/com.quantimodo.medtlcapp V/PushPlugin: sendExtras: caching extras to send at a later time.\r\n10-07 11:06:07.679 14683-14683/com.quantimodo.medtlcapp D/PushPlugin_BackgroundActionButtonHandler: BackgroundActionButtonHandler = Bundle[mParcelledData.dataSize=2896]\r\n\r\n```\r\nHere's where I press the second notification's (notId 1398) button:\r\n```\r\n10-07 11:06:07.679 14683-14683/com.quantimodo.medtlcapp D/PushPlugin_BackgroundActionButtonHandler: not id = 1398\r\n10-07 11:06:07.679 14683-14683/com.quantimodo.medtlcapp V/PushPlugin: sendExtras: caching extras to send at a later time.\r\n10-07 11:06:09.309 4065-4465/? I/Metrics:BatchTransmitte: QueuePusher.sendBatches - Drained batch queue.; Number of HIGH_ANONYMOUS queue batches sent: 0\r\n\r\n```\r\nHere's where I manually open the app (20 seconds later):\r\n```\r\n10-07 11:06:25.259 14683-14683/com.quantimodo.medtlcapp I/chromium: [INFO:CONSOLE(411)] \"appCtrl.init just set $rootScope.user from local storage to: {\"id\":230,\"wpId\":230,\"displayName\":\"Mike Sinn\",\"loginName\":\"mike\",\"email\":\"m@thinkbynumbers.org\",\"subscribed\":0,\"token\":\"mike|1475866565|2994086b0f274373a6d3208d8d6160bf\",\"administrator\":true,\"clientId\":\"IXCq4KOabRaIQw9x\",\"userRegistered\":\"2013-12-03 15:25:13\",\"timeZoneOffset\":300,\"earliestReminderTime\":\"00:01:00\",\"latestReminderTime\":\"23:59:21\",\"pushNotificationsEnabled\":true,\"trackLocation\":true,\"combineNotifications\":false}\", source: file:///android_asset/www/js/controllers/appCtrl.js (411)\r\n10-07 11:06:25.259 14683-14683/com.quantimodo.medtlcapp I/chromium: [INFO:CONSOLE(414)] \"appCtrl.init calling setUserInLocalStorageBugsnagAndRegisterDeviceForPush\", source: file:///android_asset/www/js/controllers/appCtrl.js (414)\r\n10-07 11:06:25.259 14683-14683/com.quantimodo.medtlcapp I/chromium: [INFO:CONSOLE(687)] \"$rootScope.setUserInLocalStorageBugsnagAndRegisterDeviceForPush just set $rootScope.user to: {\"id\":230,\"wpId\":230,\"displayName\":\"Mike Sinn\",\"loginName\":\"mike\",\"email\":\"m@thinkbynumbers.org\",\"subscribed\":0,\"token\":\"mike|1475866565|2994086b0f274373a6d3208d8d6160bf\",\"administrator\":true,\"clientId\":\"IXCq4KOabRaIQw9x\",\"userRegistered\":\"2013-12-03 15:25:13\",\"timeZoneOffset\":300,\"earliestReminderTime\":\"00:01:00\",\"latestReminderTime\":\"23:59:21\",\"pushNotificationsEnabled\":true,\"trackLocation\":true,\"combineNotifications\":false}\", source: file:///android_asset/www/js/controllers/appCtrl.js (687)\r\n10-07 11:06:25.259 14683-14683/com.quantimodo.medtlcapp I/chromium: [INFO:CONSOLE(602)] \"syncEverything for this user: {\"id\":230,\"wpId\":230,\"displayName\":\"Mike Sinn\",\"loginName\":\"mike\",\"email\":\"m@thinkbynumbers.org\",\"subscribed\":0,\"token\":\"mike|1475866565|2994086b0f274373a6d3208d8d6160bf\",\"administrator\":true,\"clientId\":\"IXCq4KOabRaIQw9x\",\"userRegistered\":\"2013-12-03 15:25:13\",\"timeZoneOffset\":300,\"earliestReminderTime\":\"00:01:00\",\"latestReminderTime\":\"23:59:21\",\"pushNotificationsEnabled\":true,\"trackLocation\":true,\"combineNotifications\":false}\", source: file:///android_asset/www/js/controllers/appCtrl.js (602)\r\n10-07 11:06:27.479 14683-14683/com.quantimodo.medtlcapp I/chromium: [INFO:CONSOLE(36)] \"Going to try to register push\", source: file:///android_asset/www/js/app.js (36)\r\n10-07 11:06:27.539 14683-15714/com.quantimodo.medtlcapp V/PushPlugin: execute: action=init\r\n10-07 11:06:27.539 14683-15715/com.quantimodo.medtlcapp V/PushPlugin: execute: data=[{\"android\":{\"senderID\":\"1052648855194\",\"badge\":true,\"sound\":false,\"vibrate\":false,\"icon\":\"ic_stat_icon_bw\",\"clearBadge\":true},\"browser\":{\"pushServiceURL\":\"http:\\/\\/push.api.phonegap.com\\/v1\\/push\"},\"ios\":{\"alert\":\"false\",\"badge\":\"true\",\"sound\":\"false\",\"clearBadge\":true},\"windows\":{}}]\r\n10-07 11:06:27.539 14683-15715/com.quantimodo.medtlcapp V/PushPlugin: execute: jo={\"senderID\":\"1052648855194\",\"badge\":true,\"sound\":false,\"vibrate\":false,\"icon\":\"ic_stat_icon_bw\",\"clearBadge\":true}\r\n10-07 11:06:27.539 14683-15715/com.quantimodo.medtlcapp V/PushPlugin: execute: senderID=1052648855194\r\n10-07 11:06:27.539 14683-15715/com.quantimodo.medtlcapp V/PushPlugin: onRegistered: {\"registrationId\":\"cx4WlyhDQzw:APA91bGytjxdVPu7ZDF-T2PqimMzBC48-dVt6RYT3G-koWqqo9jZgkzE7meG2RcdXzCmjX7jBNfmBCtMx99CjKEspUP-xleK8BIEPiSiL22t3O5tOaR_CPNumRpLiz8ETCIjurcLveOj\"}\r\n10-07 11:06:27.539 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: no iconColor option\r\n10-07 11:06:27.539 14683-15715/com.quantimodo.medtlcapp V/PushPlugin: sending cached extras\r\n10-07 11:06:27.539 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: convert extras to json\r\n10-07 11:06:27.539 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: key = google.sent_time\r\n10-07 11:06:27.539 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: key = actions\r\n10-07 11:06:27.539 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: key = actionCallback\r\n10-07 11:06:27.539 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: key = data\r\n10-07 11:06:27.539 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: key = user\r\n10-07 11:06:27.539 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: key = color\r\n10-07 11:06:27.539 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: key = count\r\n10-07 11:06:27.539 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: key = image\r\n10-07 11:06:27.539 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: key = notId\r\n10-07 11:06:27.539 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: key = sound\r\n10-07 11:06:27.539 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: key = title\r\n10-07 11:06:27.539 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: key = secondToLastValue\r\n10-07 11:06:27.549 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: key = google.message_id\r\n10-07 11:06:27.549 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: key = trackingReminderNotificationId\r\n10-07 11:06:27.549 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: key = message\r\n10-07 11:06:27.549 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: key = is_background\r\n10-07 11:06:27.549 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: key = thirdToLastValue\r\n10-07 11:06:27.549 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: key = coldstart\r\n10-07 11:06:27.549 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: key = collapse_key\r\n10-07 11:06:27.549 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: key = foreground\r\n10-07 11:06:27.549 14683-15715/com.quantimodo.medtlcapp D/PushPlugin: key = lastValue\r\n```\r\n\r\nHere's where the last button press (notId 1398) is handled.  notId 5926114 (seen above) is never handled.\r\n```\r\n10-07 11:06:27.549 14683-15715/com.quantimodo.medtlcapp V/PushPlugin: extrasToJSON: {\"count\":\"2\",\"image\":\"\",\"sound\":\"false\",\"title\":\"Track Overall Mood\",\"message\":\"Pull down and select a value to record or tap to open inbox for more options\",\"additionalData\":{\"actions\":[{\"title\":\"Rate 2\\/5\",\"callback\":\"trackTwoRatingAction\",\"foreground\":false},{\"title\":\"Rate 1\\/5\",\"callback\":\"trackOneRatingAction\",\"foreground\":false},{\"title\":\"Rate 3\\/5\",\"callback\":\"trackThreeRatingAction\",\"foreground\":false}],\"actionCallback\":\"trackTwoRatingAction\",\"data\":{\"image\":\"\",\"lastValue\":2,\"color\":\"#2196F3\",\"trackingReminderNotificationId\":1377727,\"thirdToLastValue\":3,\"message\":\"Pull down and select a value to record or tap to open inbox for more options\",\"title\":\"Track Overall Mood\",\"notId\":1398,\"msgcnt\":2,\"secondToLastValue\":1,\"soundname\":false,\"user\":230,\"actions\":\"[{\\\"title\\\":\\\"Rate 2\\\\\\/5\\\",\\\"callback\\\":\\\"trackTwoRatingAction\\\",\\\"foreground\\\":false},{\\\"title\\\":\\\"Rate 1\\\\\\/5\\\",\\\"callback\\\":\\\"trackOneRatingAction\\\",\\\"foreground\\\":false},{\\\"title\\\":\\\"Rate 3\\\\\\/5\\\",\\\"callback\\\":\\\"trackThreeRatingAction\\\",\\\"foreground\\\":false}]\"},\"user\":\"230\",\"color\":\"#2196F3\",\"notId\":\"1398\",\"secondToLastValue\":\"1\",\"google.message_id\":\"0:1475856346851317%3c2c8674f9fd7ecd\",\"trackingReminderNotificationId\":\"1377727\",\"is_background\":\"false\",\"thirdToLastValue\":\"3\",\"coldstart\":false,\"collapse_key\":\"do_not_collapse\",\"foreground\":false,\"lastValue\":\"2\"}}\r\n10-07 11:06:27.589 14683-15714/com.quantimodo.medtlcapp V/PushPlugin: execute: action=finish\r\n10-07 11:06:27.619 14683-14683/com.quantimodo.medtlcapp I/chromium: [INFO:CONSOLE(59)] \"Registered device for push notifications: {\"registrationId\":\"cx4WlyhDQzw:APA91bGytjxdVPu7ZDF-T2PqimMzBC48-dVt6RYT3G-koWqqo9jZgkzE7meG2RcdXzCmjX7jBNfmBCtMx99CjKEspUP-xleK8BIEPiSiL22t3O5tOaR_CPNumRpLiz8ETCIjurcLveOj\"}\", source: file:///android_asset/www/js/app.js (59)\r\n10-07 11:06:27.619 14683-14683/com.quantimodo.medtlcapp I/chromium: [INFO:CONSOLE(62)] \"Got device token for push notifications: cx4WlyhDQzw:APA91bGytjxdVPu7ZDF-T2PqimMzBC48-dVt6RYT3G-koWqqo9jZgkzE7meG2RcdXzCmjX7jBNfmBCtMx99CjKEspUP-xleK8BIEPiSiL22t3O5tOaR_CPNumRpLiz8ETCIjurcLveOj\", source: file:///android_asset/www/js/app.js (62)\r\n10-07 11:06:27.629 14683-14683/com.quantimodo.medtlcapp I/chromium: [INFO:CONSOLE(488)] \"trackDefaultValueAction Push data: {\"count\":\"2\",\"image\":\"\",\"sound\":\"false\",\"title\":\"Track Overall Mood\",\"message\":\"Pull down and select a value to record or tap to open inbox for more options\",\"additionalData\":{\"actions\":[{\"title\":\"Rate 2/5\",\"callback\":\"trackTwoRatingAction\",\"foreground\":false},{\"title\":\"Rate 1/5\",\"callback\":\"trackOneRatingAction\",\"foreground\":false},{\"title\":\"Rate 3/5\",\"callback\":\"trackThreeRatingAction\",\"foreground\":false}],\"actionCallback\":\"trackTwoRatingAction\",\"data\":{\"image\":\"\",\"lastValue\":2,\"color\":\"#2196F3\",\"trackingReminderNotificationId\":1377727,\"thirdToLastValue\":3,\"message\":\"Pull down and select a value to record or tap to open inbox for more options\",\"title\":\"Track Overall Mood\",\"notId\":1398,\"msgcnt\":2,\"secondToLastValue\":1,\"soundname\":false,\"user\":230,\"actions\":\"[{\\\"title\\\":\\\"Rate 2\\\\/5\\\",\\\"callback\\\":\\\"trackTwoRatingAction\\\",\\\"foreground\\\":false},{\\\"title\\\":\\\"Rate 1\\\\/5\\\",\\\"callback\\\":\\\"trackOneRatingAction\\\",\\\"foreground\\\":false},{\\\"title\\\":\\\"Rate 3\\\\/5\\\",\\\"callback\\\":\\\"trackThreeRatingAction\\\",\\\"foreground\\\":false}]\"},\"user\":\"230\",\"color\":\"#2196F3\",\"notId\":\"1398\",\"secondToLastValue\":\"1\",\"google.message_id\":\"0:1475856346851317%3c2c8674f9fd7ecd\",\"trackingReminderNotificationId\":\"1377727\",\"is_background\":\"false\",\"thirdToLastValue\":\"3\",\"coldstart\":false,\"collapse_key\":\"do_not_collapse\",\"foreground\":false,\"lastValue\":\"2\"}}\", source: file:///android_asset/www/lib/bugsnag/src/bugsnag.js (488)\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/comments/253852664","html_url":"https://github.com/phonegap/phonegap-plugin-push/issues/1271#issuecomment-253852664","issue_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/1271","id":253852664,"user":{"login":"mikepsinn","id":2808553,"avatar_url":"https://avatars.githubusercontent.com/u/2808553?v=3","gravatar_id":"","url":"https://api.github.com/users/mikepsinn","html_url":"https://github.com/mikepsinn","followers_url":"https://api.github.com/users/mikepsinn/followers","following_url":"https://api.github.com/users/mikepsinn/following{/other_user}","gists_url":"https://api.github.com/users/mikepsinn/gists{/gist_id}","starred_url":"https://api.github.com/users/mikepsinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikepsinn/subscriptions","organizations_url":"https://api.github.com/users/mikepsinn/orgs","repos_url":"https://api.github.com/users/mikepsinn/repos","events_url":"https://api.github.com/users/mikepsinn/events{/privacy}","received_events_url":"https://api.github.com/users/mikepsinn/received_events","type":"User","site_admin":false},"created_at":"2016-10-14T16:33:03Z","updated_at":"2016-10-14T16:33:03Z","body":"@macdonst \r\n\r\nSo the app should be opening in the background even if I manually killed it after pressing an action button, right?  \r\n\r\nDo you have any suggestions about how to figure out why it's not doing that?"}}
{"actor":{"display_login":"mikepsinn"}}