diff --git a/src/android/BackgroundMode.java b/src/android/BackgroundMode.java index 8278901..fd0b041 100644 --- a/src/android/BackgroundMode.java +++ b/src/android/BackgroundMode.java @@ -294,7 +294,7 @@ public class BackgroundMode extends CordovaPlugin { String str = String.format("%s._setActive(%b)", JS_NAMESPACE, active); - str = String.format("%s;%s.on%s(%s)", + str = String.format("%s;%s.on('%s', %s)", str, JS_NAMESPACE, eventName, params); str = String.format("%s;%s.fireEvent('%s',%s);",