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

🐧 Fix Android O channel confusing name/description #2142

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

camillebeaumont
Copy link

@camillebeaumont camillebeaumont commented Jan 11, 2018

Fix Android O channel creation confusing name/description

Description

Since Android O, notifications required channels. Channel required an id, a name and a priority to be created. An optional description can be added to a channel. see docs

Motivation and Context

Actually, plugin api required a description field in JS that is bind to the channel name on creation. But when retrieving channels list, plugin display ID and description (the real one) and not the channel name. It's a bit confusing and some (like me) may tear their hair out finding what going on when list didn't show their channel name.

How Has This Been Tested?

This as been tested on a Nexus 5X on Android 8.1., creating a channel with just a name, and another with name and description.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Breaking since old description field become name, and the "new" description field is correctly used for channel description.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@macdonst macdonst self-requested a review January 15, 2018 20:33
@stale
Copy link

stale bot commented Jun 3, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 3, 2018
@camillebeaumont
Copy link
Author

Any news about this PR ?

@camillebeaumont
Copy link
Author

Rebase PR on last dev

@OliverOng1995
Copy link

For default channel,description should be default channel
options.put(CHANNEL_ID, DEFAULT_CHANNEL_ID);
options.putOpt(CHANNEL_NAME, "PhoneGap PushPlugin");
options.putOpt(CHANNEL_DESCRIPTION, "Default channel");

@camillebeaumont
Copy link
Author

camillebeaumont commented Oct 29, 2018

@OliverOng1995 Good catch ! I fixed it ;)

@OliverOng1995
Copy link

Also please edit the Type definition for those using typescript to reflect the changes

@camillebeaumont
Copy link
Author

My bad... didn't commit the file. I've no excuses since I use typescript for my tests !

@fredgalvao
Copy link
Collaborator

@camillebeaumont Thanks for the type definition updates! However, @OliverOng1995 did some of the work on his #2607 PR, which now conflicts with this one. We'll need to sync both PRs to be able to work it.

@camillebeaumont
Copy link
Author

camillebeaumont commented Nov 6, 2018

@fredgalvao How can I help for this ? Sorry it's my first PR :)

@fredgalvao
Copy link
Collaborator

We'll need to have one of them (2 PRs) merged first, and then the other will need to merge/rebase from origin/master to sync. Soon someone should have the time to take a look at them and either merge or ask for changes.

Another option would be to have a unified pull request with both code intentions, considering they touch very close points.

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

Successfully merging this pull request may close these issues.

3 participants