mirror of
https://github.com/status-im/instabug-reactnative.git
synced 2025-03-02 14:10:40 +00:00
Enable setPromptOptionsEnabled
API
This commit is contained in:
parent
7ca40c4db4
commit
646041064b
@ -1025,6 +1025,26 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable/Disable prompt options when SDK invoked. When only a single option is enabled it
|
||||
* becomes the default
|
||||
* invocation option that SDK gets invoked with and prompt options screen will not show. When
|
||||
* none is enabled, Bug
|
||||
* reporting becomes the default invocation option.
|
||||
*
|
||||
* @param {boolean} chat weather Talk to us is enable or not
|
||||
* @param {boolean} bug weather Report a Problem is enable or not
|
||||
* @param {boolean} feedback weather General Feedback is enable or not
|
||||
* */
|
||||
@ReactMethod
|
||||
public void setPromptOptionsEnabled(boolean chat, boolean bug, boolean feedback) {
|
||||
try {
|
||||
mInstabug.setPromptOptionsEnabled(chat, bug, feedback);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private InstabugCustomTextPlaceHolder.Key getStringToKeyConstant(String key) {
|
||||
String keyInLowerCase = key.toLowerCase();
|
||||
switch (keyInLowerCase) {
|
||||
|
16
index.js
16
index.js
@ -675,6 +675,22 @@ module.exports = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Enable/Disable prompt options when SDK invoked. When only a single option is enabled it
|
||||
* becomes the default
|
||||
* invocation option that SDK gets invoked with and prompt options screen will not show. When
|
||||
* none is enabled, Bug
|
||||
* reporting becomes the default invocation option.
|
||||
*
|
||||
* @param {boolean} chat weather Talk to us is enable or not
|
||||
* @param {boolean} bug weather Report a Problem is enable or not
|
||||
* @param {boolean} feedback weather General Feedback is enable or not
|
||||
* */
|
||||
setPromptOptionsEnabled: function (chat, bug, feedback) {
|
||||
Instabug.setPromptOptionsEnabled(chat, bug, feedback);
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* The event used to invoke the feedback form
|
||||
* @readonly
|
||||
|
Loading…
x
Reference in New Issue
Block a user