{"action":"opened","number":1003,"pull_request":{"url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/pulls/1003","id":72901117,"html_url":"https://github.com/katzer/cordova-plugin-local-notifications/pull/1003","diff_url":"https://github.com/katzer/cordova-plugin-local-notifications/pull/1003.diff","patch_url":"https://github.com/katzer/cordova-plugin-local-notifications/pull/1003.patch","issue_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/1003","number":1003,"state":"open","locked":false,"title":"Notification Actions/Buttons","user":{"login":"DavidBriglio","id":3886546,"avatar_url":"https://avatars.githubusercontent.com/u/3886546?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidBriglio","html_url":"https://github.com/DavidBriglio","followers_url":"https://api.github.com/users/DavidBriglio/followers","following_url":"https://api.github.com/users/DavidBriglio/following{/other_user}","gists_url":"https://api.github.com/users/DavidBriglio/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidBriglio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidBriglio/subscriptions","organizations_url":"https://api.github.com/users/DavidBriglio/orgs","repos_url":"https://api.github.com/users/DavidBriglio/repos","events_url":"https://api.github.com/users/DavidBriglio/events{/privacy}","received_events_url":"https://api.github.com/users/DavidBriglio/received_events","type":"User","site_admin":false},"body":"This implements actions/buttons in the notification. This is done using the 'action' parameter:\r\n```javascript\r\ncordova.plugins.notification.local.schedule({\r\n    id: 1,\r\n    title: \"Action Notification\",\r\n    text: \"Click on an action\",\r\n    actions: [\r\n        { \r\n            text: \"MAP\",\r\n            icon: \"res://ic_menu_mapmode\", //A drawable icon (Optional)\r\n            action: 0   //Any additional values apart from text and icon will be transferred along\r\n                        //to be used in your handler function. Here I used \"action\", but you can\r\n                        //add multiple fields with any key/value. See below for more examples.\r\n        },\r\n        {\r\n            text: \"Select\",\r\n            action: 1,\r\n            myAction: \"action1\"\r\n        },\r\n        {\r\n            text: \"Ignore\",\r\n            action: 2,\r\n            anotherValue: 0\r\n        }\r\n        //Note: There can only be up to three actions (enforced by android)\r\n    ]\r\n});\r\n```\r\n\r\nHow Actions Are Handled:\r\n\r\nWhen you add your action to the notification, the only required field is \"text\". This will display the action button without any icon. When the action is clicked it will fire a \"click\" event, passing into it the entry in the actions array. This entry will have an inserted \"notification\" element containing the rest of the notification. This allows any key/value inserted into your action element in the actions array to be passed into the handler function.\r\n\r\nie:\r\n\r\n```javascript\r\ncordova.plugins.notification.local.schedule({\r\n    id: 1,\r\n    title: \"Test\",\r\n    actions: [\r\n        {\r\n            text: \"Action1\", \r\n            val: 1\r\n        },\r\n        {\r\n            text: \"Action2\",\r\n            val: 100\r\n        }\r\n    ]\r\n});\r\n```\r\nWhen \"Action1\" is clicked, the \"click\" event will fire, sending this as the notification parameter:\r\n```javascript\r\n{\r\n    text: \"Action1\",\r\n    val: 1,\r\n    notification: {\r\n        id: 1,\r\n        title: \"Test\",\r\n        actions: [\r\n            {\r\n                text: \"Action1\", \r\n                val: 1\r\n            },\r\n            {\r\n                text: \"Action2\",\r\n                val: 100\r\n            }\r\n        ]\r\n    }\r\n}\r\n```","created_at":"2016-06-07T15:52:41Z","updated_at":"2016-06-07T15:52:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d2c907f23c494b9e8c15cb9d8efe33f32768b9b3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/pulls/1003/commits","review_comments_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/pulls/1003/comments","review_comment_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/pulls/comments{/number}","comments_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/1003/comments","statuses_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/statuses/894d608ab7983a0946f6435a209e517ae15f1f4a","head":{"label":"DavidBriglio:NotificationActions","ref":"NotificationActions","sha":"894d608ab7983a0946f6435a209e517ae15f1f4a","user":{"login":"DavidBriglio","id":3886546,"avatar_url":"https://avatars.githubusercontent.com/u/3886546?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidBriglio","html_url":"https://github.com/DavidBriglio","followers_url":"https://api.github.com/users/DavidBriglio/followers","following_url":"https://api.github.com/users/DavidBriglio/following{/other_user}","gists_url":"https://api.github.com/users/DavidBriglio/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidBriglio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidBriglio/subscriptions","organizations_url":"https://api.github.com/users/DavidBriglio/orgs","repos_url":"https://api.github.com/users/DavidBriglio/repos","events_url":"https://api.github.com/users/DavidBriglio/events{/privacy}","received_events_url":"https://api.github.com/users/DavidBriglio/received_events","type":"User","site_admin":false},"repo":{"id":60028928,"name":"cordova-plugin-local-notifications","full_name":"DavidBriglio/cordova-plugin-local-notifications","owner":{"login":"DavidBriglio","id":3886546,"avatar_url":"https://avatars.githubusercontent.com/u/3886546?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidBriglio","html_url":"https://github.com/DavidBriglio","followers_url":"https://api.github.com/users/DavidBriglio/followers","following_url":"https://api.github.com/users/DavidBriglio/following{/other_user}","gists_url":"https://api.github.com/users/DavidBriglio/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidBriglio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidBriglio/subscriptions","organizations_url":"https://api.github.com/users/DavidBriglio/orgs","repos_url":"https://api.github.com/users/DavidBriglio/repos","events_url":"https://api.github.com/users/DavidBriglio/events{/privacy}","received_events_url":"https://api.github.com/users/DavidBriglio/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DavidBriglio/cordova-plugin-local-notifications","description":"Cordova Local-Notification Plugin [DavidBriglio Fork]","fork":true,"url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications","forks_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/forks","keys_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/teams","hooks_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/hooks","issue_events_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/issues/events{/number}","events_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/events","assignees_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/assignees{/user}","branches_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/branches{/branch}","tags_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/tags","blobs_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/git/refs{/sha}","trees_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/statuses/{sha}","languages_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/languages","stargazers_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/stargazers","contributors_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/contributors","subscribers_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/subscribers","subscription_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/subscription","commits_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/commits{/sha}","git_commits_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/git/commits{/sha}","comments_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/comments{/number}","issue_comment_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/issues/comments{/number}","contents_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/contents/{+path}","compare_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/merges","archive_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/downloads","issues_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/issues{/number}","pulls_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/pulls{/number}","milestones_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/milestones{/number}","notifications_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/labels{/name}","releases_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/releases{/id}","deployments_url":"https://api.github.com/repos/DavidBriglio/cordova-plugin-local-notifications/deployments","created_at":"2016-05-30T17:53:03Z","updated_at":"2016-05-31T20:06:30Z","pushed_at":"2016-06-07T15:46:08Z","git_url":"git://github.com/DavidBriglio/cordova-plugin-local-notifications.git","ssh_url":"git@github.com:DavidBriglio/cordova-plugin-local-notifications.git","clone_url":"https://github.com/DavidBriglio/cordova-plugin-local-notifications.git","svn_url":"https://github.com/DavidBriglio/cordova-plugin-local-notifications","homepage":"","size":21012,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"katzer:master","ref":"master","sha":"a3f2be443b4d4539557611b5081453a7bfd1be46","user":{"login":"katzer","id":2039384,"avatar_url":"https://avatars.githubusercontent.com/u/2039384?v=3","gravatar_id":"","url":"https://api.github.com/users/katzer","html_url":"https://github.com/katzer","followers_url":"https://api.github.com/users/katzer/followers","following_url":"https://api.github.com/users/katzer/following{/other_user}","gists_url":"https://api.github.com/users/katzer/gists{/gist_id}","starred_url":"https://api.github.com/users/katzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katzer/subscriptions","organizations_url":"https://api.github.com/users/katzer/orgs","repos_url":"https://api.github.com/users/katzer/repos","events_url":"https://api.github.com/users/katzer/events{/privacy}","received_events_url":"https://api.github.com/users/katzer/received_events","type":"User","site_admin":false},"repo":{"id":12019742,"name":"cordova-plugin-local-notifications","full_name":"katzer/cordova-plugin-local-notifications","owner":{"login":"katzer","id":2039384,"avatar_url":"https://avatars.githubusercontent.com/u/2039384?v=3","gravatar_id":"","url":"https://api.github.com/users/katzer","html_url":"https://github.com/katzer","followers_url":"https://api.github.com/users/katzer/followers","following_url":"https://api.github.com/users/katzer/following{/other_user}","gists_url":"https://api.github.com/users/katzer/gists{/gist_id}","starred_url":"https://api.github.com/users/katzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katzer/subscriptions","organizations_url":"https://api.github.com/users/katzer/orgs","repos_url":"https://api.github.com/users/katzer/repos","events_url":"https://api.github.com/users/katzer/events{/privacy}","received_events_url":"https://api.github.com/users/katzer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/katzer/cordova-plugin-local-notifications","description":"Cordova Local-Notification Plugin","fork":false,"url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications","forks_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/forks","keys_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/keys{/key_id}","collaborators_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/teams","hooks_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/hooks","issue_events_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/events{/number}","events_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/events","assignees_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/assignees{/user}","branches_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/branches{/branch}","tags_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/tags","blobs_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/git/refs{/sha}","trees_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/git/trees{/sha}","statuses_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/statuses/{sha}","languages_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/languages","stargazers_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/stargazers","contributors_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/contributors","subscribers_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/subscribers","subscription_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/subscription","commits_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/commits{/sha}","git_commits_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/git/commits{/sha}","comments_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/comments{/number}","issue_comment_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/comments{/number}","contents_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/contents/{+path}","compare_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/compare/{base}...{head}","merges_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/merges","archive_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/downloads","issues_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues{/number}","pulls_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/pulls{/number}","milestones_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/milestones{/number}","notifications_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/labels{/name}","releases_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/releases{/id}","deployments_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/deployments","created_at":"2013-08-10T11:25:59Z","updated_at":"2016-06-07T00:23:55Z","pushed_at":"2016-06-07T15:52:41Z","git_url":"git://github.com/katzer/cordova-plugin-local-notifications.git","ssh_url":"git@github.com:katzer/cordova-plugin-local-notifications.git","clone_url":"https://github.com/katzer/cordova-plugin-local-notifications.git","svn_url":"https://github.com/katzer/cordova-plugin-local-notifications","homepage":"","size":22451,"stargazers_count":1199,"watchers_count":1199,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":757,"mirror_url":null,"open_issues_count":175,"forks":757,"open_issues":175,"watchers":1199,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/pulls/1003"},"html":{"href":"https://github.com/katzer/cordova-plugin-local-notifications/pull/1003"},"issue":{"href":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/1003"},"comments":{"href":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/1003/comments"},"review_comments":{"href":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/pulls/1003/comments"},"review_comment":{"href":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/pulls/1003/commits"},"statuses":{"href":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/statuses/894d608ab7983a0946f6435a209e517ae15f1f4a"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":51,"deletions":0,"changed_files":3}}
{"actor":{"display_login":"DavidBriglio"}}