Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Implement notification channels #1949

Closed
macdonst opened this issue Sep 11, 2017 · 5 comments
Closed

Implement notification channels #1949

macdonst opened this issue Sep 11, 2017 · 5 comments
Assignees
Milestone

Comments

@macdonst
Copy link
Member

Expected Behaviour

Expect notifications to be displayed when your app targets sdk 26 (Android O)

Actual Behaviour

Notification is not shown.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Set your targetSdkVersion to 26, build your app and send a push notification.

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

Android 8.0

(Android) What device vendor (e.g. Samsung, HTC, Sony...)

All

Cordova CLI version and cordova platform version

cordova --version                                    # 7.0.1
cordova platform version android          # 6.3.0-dev

Plugin version

cordova plugin version | grep phonegap-plugin-push   # 2.0.0

Sample Push Data Payload

{
    "data" : {
        "title": "Test Notification",
        "body": "This offer expires at 11:30 or whatever",
        "notId": 10,
        "surveyID": "ewtawgreg-gragrag-rgarhthgbad"
    }
}

Sample Code that illustrates the problem

var push = PushNotification.init({
	android: {
	},
    browser: {
        pushServiceURL: 'http://push.api.phonegap.com/v1/push'
    },
	ios: {
		alert: "true",
		badge: true,
		sound: 'false'
	},
	windows: {}
});

Logs taken while reproducing problem

N/A

@macdonst
Copy link
Member Author

Started working on this. A bit of a PITA as there is not compat library for this right now.

@macdonst
Copy link
Member Author

Currently in master and planned to be part of a 2.1.0 release. Update your SDK's to Android O everyone as you'll need it to build.

@fredgalvao
Copy link
Collaborator

I made some comments/regards on the commit itself. If/when you have the time to go through them, specially on the channel attributes/constants topic, we should update the type definition files accordingly for all that sweet typescript/ionic sugar.

@macdonst
Copy link
Member Author

@fredgalvao okay I kinda feel like this one is done now. Lemme know if you see anything else. I've created a new issue for the .ts file update.

@lock
Copy link

lock bot commented Jun 3, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants