diff --git a/android/src/main/java/com/onesignal/flutter/OneSignalInAppMessages.java b/android/src/main/java/com/onesignal/flutter/OneSignalInAppMessages.java index 4d414aa..58e34d4 100644 --- a/android/src/main/java/com/onesignal/flutter/OneSignalInAppMessages.java +++ b/android/src/main/java/com/onesignal/flutter/OneSignalInAppMessages.java @@ -44,6 +44,8 @@ else if (call.method.contentEquals("OneSignal#removeTrigger")) this.removeTrigger(call, result); else if (call.method.contentEquals("OneSignal#removeTriggers")) this.removeTriggers(call, result); + else if (call.method.contentEquals("OneSignal#clearTriggers")) + this.clearTriggers(); else if (call.method.contentEquals("OneSignal#arePaused")) replySuccess(result, OneSignal.getInAppMessages().getPaused()); else if (call.method.contentEquals("OneSignal#paused")) @@ -81,6 +83,11 @@ private void removeTriggers(MethodCall call, Result result) { } } + private void clearTriggers(MethodCall call, Result result) { + OneSignal.getInAppMessages().clearTriggers(); + replySuccess(result, null); + } + private void paused(MethodCall call, Result result) { OneSignal.getInAppMessages().setPaused((boolean) call.arguments); replySuccess(result, null);