Add missing api setEnableInAppNotificationSound

This commit is contained in:
Salma ElTarzi 2017-08-26 20:26:01 +02:00
parent e080ee96a2
commit c49510c406
2 changed files with 29 additions and 0 deletions

View File

@ -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:

View File

@ -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