Enable clearFileAttachment API for android

This commit is contained in:
DevHossamHassan 2017-06-22 13:53:35 +02:00
parent 646041064b
commit 8c5258eebe
2 changed files with 25 additions and 4 deletions

View File

@ -1032,10 +1032,10 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
* none is enabled, Bug * none is enabled, Bug
* reporting becomes the default invocation option. * reporting becomes the default invocation option.
* *
* @param {boolean} chat weather Talk to us is enable or not * @param {boolean} chat weather Talk to us is enable or not
* @param {boolean} bug weather Report a Problem 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 * @param {boolean} feedback weather General Feedback is enable or not
* */ */
@ReactMethod @ReactMethod
public void setPromptOptionsEnabled(boolean chat, boolean bug, boolean feedback) { public void setPromptOptionsEnabled(boolean chat, boolean bug, boolean feedback) {
try { try {
@ -1045,6 +1045,20 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
} }
} }
/**
* Clears all Uris of the attached files.
* The URIs which added via {@link Instabug#addFileAttachment} API not the physical files.
*/
@ReactMethod
public void clearFileAttachment() {
try {
mInstabug.clearFileAttachment();
} catch (Exception e) {
e.printStackTrace();
}
},
private InstabugCustomTextPlaceHolder.Key getStringToKeyConstant(String key) { private InstabugCustomTextPlaceHolder.Key getStringToKeyConstant(String key) {
String keyInLowerCase = key.toLowerCase(); String keyInLowerCase = key.toLowerCase();
switch (keyInLowerCase) { switch (keyInLowerCase) {

View File

@ -690,6 +690,13 @@ module.exports = {
Instabug.setPromptOptionsEnabled(chat, bug, feedback); Instabug.setPromptOptionsEnabled(chat, bug, feedback);
}, },
/**
* Clears all Uris of the attached files.
* The URIs which added via {@link Instabug#addFileAttachment} API not the physical files.
*/
clearFileAttachment: function () {
Instabug.clearFileAttachment();
},
/** /**
* The event used to invoke the feedback form * The event used to invoke the feedback form