Skip to content

Commit ff8138a

Browse files
committed
Work around a bug that causes the 'playSound' key to arrive as a string causing attempts to read it to fail. Instead just check if it was set before attempting to play a sound. https://chefsteps.atlassian.net/browse/MOBCOOK-4510
1 parent 073c94d commit ff8138a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public void sendToNotificationCentre(Bundle bundle) {
279279
bundle.putBoolean("userInteraction", true);
280280
intent.putExtra("notification", bundle);
281281

282-
if (!bundle.containsKey("playSound") || bundle.getBoolean("playSound")) {
282+
if (bundle.containsKey("playSound")) {
283283
Uri soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
284284
String soundName = bundle.getString("soundName");
285285
if (soundName != null) {

0 commit comments

Comments
 (0)