From 5e8539577c7bd3ed699b5e9e0da0ad628460c0ad Mon Sep 17 00:00:00 2001 From: Florent Bonomo Date: Fri, 26 Mar 2021 14:51:54 -0700 Subject: [PATCH 1/3] Fix: Foreground notifications missing small icon Resolves https://github.com/zo0r/react-native-push-notification/issues/1729 --- .../modules/RNReceivedMessageHandler.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNReceivedMessageHandler.java b/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNReceivedMessageHandler.java index b255f89eb..721ca40cc 100644 --- a/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNReceivedMessageHandler.java +++ b/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNReceivedMessageHandler.java @@ -56,6 +56,12 @@ public void handleReceivedMessage(RemoteMessage message) { bundle.putString("color", remoteNotification.getColor()); bundle.putString("tag", remoteNotification.getTag()); + if(remoteNotification.getIcon() != null) { + bundle.putString("smallIcon", remoteNotification.getIcon()); + } else { + bundle.putString("smallIcon", "ic_notification"); + } + if(remoteNotification.getChannelId() != null) { bundle.putString("channelId", remoteNotification.getChannelId()); } From c3261b9f402a6eaeb0381bda965b04d58d2e35a9 Mon Sep 17 00:00:00 2001 From: Brent Kelly <5814579+mrbrentkelly@users.noreply.github.com> Date: Thu, 13 May 2021 10:40:11 +0100 Subject: [PATCH 2/3] fix(android): Adding Java 8 compile options for Android instrumented tests --- android/build.gradle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android/build.gradle b/android/build.gradle index 7bfeaed0b..d6019f61c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -27,6 +27,11 @@ android { compileSdkVersion safeExtGet('compileSdkVersion', 28) buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3') + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + defaultConfig { minSdkVersion safeExtGet('minSdkVersion', 16) targetSdkVersion safeExtGet('targetSdkVersion', 28) From c1d6ee56e016e4adf7ff62db493b1bde265615a0 Mon Sep 17 00:00:00 2001 From: Boris Tacyniak Date: Sat, 19 Jun 2021 21:10:28 +0200 Subject: [PATCH 3/3] Bump version 7.3.2. --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ff061983..75fef76d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,12 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html ### Fixed +## [7.3.2] 2021-05-12 + +### Fixed + +- (Android) Fix: Foreground notifications missing small icon. [#1927](https://github.com/zo0r/react-native-push-notification/pull/1927) + ## [7.3.1] 2021-05-12 ### Fixed diff --git a/package.json b/package.json index 8c2a36017..4fd9417c1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-push-notification", - "version": "7.3.1", + "version": "7.3.2", "description": "React Native Local and Remote Notifications", "main": "index.js", "scripts": {