Update LocalNotifications.java#19
Open
ithubdeveloper wants to merge 2 commits intophonegap:masterfrom
Open
Conversation
Fix Android Oreo issue.
Member
|
@maverickmishra can you review this PR, merge it and release a new version of the plugin if everything looks good? |
| String tag = args.getString(4); | ||
| String icon = args.getString(5); | ||
|
|
||
| String NOTIFICATION_CHANNEL_ID = "my_channel_id_01"; |
Member
|
@ithubdeveloper You will need to change the version of android here : https://github.com/ithubdeveloper/phonegap-plugin-local-notification/blob/patch-1/plugin.xml#L18 to :
|
Menardi
reviewed
Sep 24, 2018
| NotificationCompat.Builder mBuilder = null; | ||
| if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) { | ||
| int importance = NotificationManager.IMPORTANCE_DEFAULT; | ||
| NotificationChannel notificationChannel = new NotificationChannel("ID", "Name", importance); |
There was a problem hiding this comment.
The channel should be named differently. Maybe id="default" and name="Default"? Also, just use NotificationManager.IMPORTANCE_DEFAULT directly here rather than creating the importance variable.
| // Build notifications | ||
| NotificationCompat.Builder mBuilder = | ||
| new NotificationCompat.Builder(context) | ||
| mBuilder = mBuilder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix Android Oreo issue.
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: