Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Actionable notifications #482

Closed
wants to merge 1 commit into from
Closed

[feat] Actionable notifications #482

wants to merge 1 commit into from

Conversation

roman-rr
Copy link

@roman-rr roman-rr commented Aug 9, 2020

PR Type

Add actionable types and categories for push notifications
iOS Guidelines
9d44d382-c2bc-4d0d-b8d6-5ee203813dea

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Documentation changes
  • Other... Please describe:

PR Checklist

For bug fixes / features, please check if your PR fulfills the following requirements:

  • Testing has been carried out for the changes have been added
  • Regression testing has been carried out for existing functionality
  • Docs have been added / updated

What is the purpose of this PR?

Using Actionable Notifications

Does this PR introduce a breaking change?

  • Yes
  • No

How to use

  1. Add pn-actions.json file into root of cordova project
{
  "PushNotificationActions": [
    {
      "category": "news",
      "actions": [
        {
          "id": "read", "title": "Read"
        },
        {
          "id": "skip", "title": "Skip"
        },
        {
          "id": "add", "title": "Add to list"
        }
      ]
    }
  ] 
}
  1. Inject line to config.xml
<resource-file src="pn-actions.json" />
  1. Add click_action to your GCM notification payload
 "notification" : {
     "body" : "Body of Your Notification",
     "title": "Title of Your Notification",
     "click_action": "news"
 }

Done!

@dpa99c dpa99c changed the base branch from cli_build to dev August 11, 2020 14:33
@dpa99c dpa99c changed the base branch from dev to cli_build August 11, 2020 14:45
@dpa99c
Copy link
Owner

dpa99c commented Aug 12, 2020

Thanks for this, I have cherrypicked, documented and merged to master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants