Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit f8eec4b

Browse files
committedFeb 28, 2021
setNotificationSilent()
1 parent 1f462d8 commit f8eec4b

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed
 

‎android/build.gradle

+1-6
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,9 @@ android {
4343
}
4444

4545
dependencies {
46-
// Use either AndroidX library names or old/support library names based on major version of support lib
47-
def supportLibVersion = safeExtGet('supportLibVersion', '27.1.1')
48-
def supportLibMajorVersion = supportLibVersion.split('\\.')[0] as int
49-
def appCompatLibName = (supportLibMajorVersion < 20) ? "androidx.appcompat:appcompat" : "com.android.support:appcompat-v7"
50-
5146
implementation fileTree(dir: 'libs', include: ['*.jar'])
5247
testImplementation 'junit:junit:4.12'
53-
implementation "$appCompatLibName:$supportLibVersion"
48+
implementation "androidx.appcompat:appcompat:1.2.0"
5449
implementation 'com.facebook.react:react-native:+'
5550
implementation 'me.leolin:ShortcutBadger:1.1.22@aar'
5651
implementation "com.google.firebase:firebase-messaging:${safeExtGet('firebaseMessagingVersion', '+')}"

‎android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationHelper.java

+2
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,8 @@ public void sendToNotificationCentreWithPicture(Bundle bundle, Bitmap largeIconB
431431
soundUri = getSoundUri(soundName);
432432

433433
notification.setSound(soundUri);
434+
} else {
435+
notification.setNotificationSilent();
434436
}
435437

436438
if (soundUri == null || Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {

0 commit comments

Comments
 (0)
Failed to load comments.