{"action":"created","issue":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/551","labels_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/551/labels{/name}","comments_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/551/comments","events_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/551/events","html_url":"https://github.com/phonegap/phonegap-plugin-push/issues/551","id":129522922,"number":551,"title":"Handling notifications in the background (without loading the app UI)","user":{"login":"asunar","id":204049,"avatar_url":"https://avatars.githubusercontent.com/u/204049?v=3","gravatar_id":"","url":"https://api.github.com/users/asunar","html_url":"https://github.com/asunar","followers_url":"https://api.github.com/users/asunar/followers","following_url":"https://api.github.com/users/asunar/following{/other_user}","gists_url":"https://api.github.com/users/asunar/gists{/gist_id}","starred_url":"https://api.github.com/users/asunar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asunar/subscriptions","organizations_url":"https://api.github.com/users/asunar/orgs","repos_url":"https://api.github.com/users/asunar/repos","events_url":"https://api.github.com/users/asunar/events{/privacy}","received_events_url":"https://api.github.com/users/asunar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-28T17:44:47Z","updated_at":"2016-01-30T05:14:06Z","closed_at":null,"body":"We're using phonegap push plugin to send interactive push notifications (with buttons) (Android 6.0.1, ios 8). Documentation suggests using \"content-available\" in the payload for background notifications.\r\n\r\nHowever, even with content-available value set; when user clicks on the push notification button the plugin loads the application and shows the login page. Below is a sample push notification payload.\r\n\r\n`{\r\n\"data\" : {\r\n    \"title\":\"Test title\", \r\n    \"message\":\"Test message\", \r\n    \"content-available\": \"1\",\r\n    \"actions\": [{ icon: \"\", title: \"APPROVE\", callback: \"approve\"},\r\n         { icon: \"\",title: \"DENY\", callback: \"deny\"}\r\n        ]\r\n    }\r\n}`\r\n\r\nCallback functions (approve, deny in the above sample) are fired and push action buttons are handled appropriately.\r\n\r\nMy question is:\r\n\r\nHow can the app handle push notification action buttons in the background WITHOUT loading the app and showing the login screen?\r\n\r\nDesired workflow:\r\n\r\n1.     The app may or may not be running in the background, the phone may or may not be locked (requiring passcode if locked)\r\n2.     User receives a push notification with approve/deny buttons.\r\n3.     User swipes (down in Android, left in ios) and reveals the buttons.\r\n4.     User clicks on a button\r\n5.     User is NOT prompted for a passcode\r\n6.     App UI is NOT shown\r\n7.     Appropriate callback function is executed (working)"},"comment":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/comments/177069487","html_url":"https://github.com/phonegap/phonegap-plugin-push/issues/551#issuecomment-177069487","issue_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/551","id":177069487,"user":{"login":"asunar","id":204049,"avatar_url":"https://avatars.githubusercontent.com/u/204049?v=3","gravatar_id":"","url":"https://api.github.com/users/asunar","html_url":"https://github.com/asunar","followers_url":"https://api.github.com/users/asunar/followers","following_url":"https://api.github.com/users/asunar/following{/other_user}","gists_url":"https://api.github.com/users/asunar/gists{/gist_id}","starred_url":"https://api.github.com/users/asunar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asunar/subscriptions","organizations_url":"https://api.github.com/users/asunar/orgs","repos_url":"https://api.github.com/users/asunar/repos","events_url":"https://api.github.com/users/asunar/events{/privacy}","received_events_url":"https://api.github.com/users/asunar/received_events","type":"User","site_admin":false},"created_at":"2016-01-30T05:14:06Z","updated_at":"2016-01-30T05:14:06Z","body":"Updated issue per @macdonst."}}