mirror of
https://github.com/status-im/instabug-reactnative.git
synced 2025-03-02 14:10:40 +00:00
✨ Add missing api setEnableInAppNotificationSound
This commit is contained in:
parent
e080ee96a2
commit
c49510c406
@ -1144,6 +1144,22 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether new in app notification received will play a small sound notification
|
||||
* or not (Default is {@code false})
|
||||
*
|
||||
* @param shouldPlaySound desired state of conversation sounds
|
||||
* @since 4.1.0
|
||||
*/
|
||||
@ReactMethod
|
||||
public void setEnableInAppNotificationSound(boolean shouldPlaySound) {
|
||||
try {
|
||||
mInstabug.setEnableInAppNotificationSound(shouldPlaySound);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private InstabugCustomTextPlaceHolder.Key getStringToKeyConstant(String key) {
|
||||
switch (key) {
|
||||
case SHAKE_HINT:
|
||||
|
13
index.js
13
index.js
@ -788,6 +788,19 @@ module.exports = {
|
||||
Instabug.setSuccessDialogEnabled(enabled);
|
||||
},
|
||||
|
||||
/**
|
||||
* Set whether new in app notification received will play a small sound notification
|
||||
* or not (Default is {@code false})
|
||||
*
|
||||
* @param shouldPlaySound desired state of conversation sounds
|
||||
* @since 4.1.0
|
||||
*/
|
||||
setEnableInAppNotificationSound: function(shouldPlaySound) {
|
||||
if(Platform.OS === 'android') {
|
||||
Instabug.setEnableInAppNotificationSound(shouldPlaySound);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* The event used to invoke the feedback form
|
||||
* @readonly
|
||||
|
Loading…
x
Reference in New Issue
Block a user