diff --git a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java index 1341573..f747e45 100644 --- a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java +++ b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java @@ -1032,10 +1032,10 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { * 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 - * */ + * @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 { @@ -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) { String keyInLowerCase = key.toLowerCase(); switch (keyInLowerCase) { diff --git a/index.js b/index.js index de4e6e1..27348dc 100644 --- a/index.js +++ b/index.js @@ -690,6 +690,13 @@ module.exports = { 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