Skip to content

Commit c49510c

Browse files
committed
✨ Add missing api setEnableInAppNotificationSound
1 parent e080ee9 commit c49510c

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,6 +1144,22 @@ public void setSuccessDialogEnabled(boolean enabled) {
11441144
}
11451145
}
11461146

1147+
/**
1148+
* Set whether new in app notification received will play a small sound notification
1149+
* or not (Default is {@code false})
1150+
*
1151+
* @param shouldPlaySound desired state of conversation sounds
1152+
* @since 4.1.0
1153+
*/
1154+
@ReactMethod
1155+
public void setEnableInAppNotificationSound(boolean shouldPlaySound) {
1156+
try {
1157+
mInstabug.setEnableInAppNotificationSound(shouldPlaySound);
1158+
} catch (Exception e) {
1159+
e.printStackTrace();
1160+
}
1161+
}
1162+
11471163
private InstabugCustomTextPlaceHolder.Key getStringToKeyConstant(String key) {
11481164
switch (key) {
11491165
case SHAKE_HINT:

index.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,19 @@ module.exports = {
788788
Instabug.setSuccessDialogEnabled(enabled);
789789
},
790790

791+
/**
792+
* Set whether new in app notification received will play a small sound notification
793+
* or not (Default is {@code false})
794+
*
795+
* @param shouldPlaySound desired state of conversation sounds
796+
* @since 4.1.0
797+
*/
798+
setEnableInAppNotificationSound: function(shouldPlaySound) {
799+
if(Platform.OS === 'android') {
800+
Instabug.setEnableInAppNotificationSound(shouldPlaySound);
801+
}
802+
},
803+
791804
/**
792805
* The event used to invoke the feedback form
793806
* @readonly

0 commit comments

Comments
 (0)