From 681e3ca480223e55f5ffeb8a1451a1f50c0bda3a Mon Sep 17 00:00:00 2001 From: fyayc-chrisat Date: Sun, 10 Feb 2019 19:25:25 +0100 Subject: [PATCH] function onactivate does no longer exist I got the error message that "onactivate" does not exist with the latest HEAD Version. I therefore investigated and found out that since the on() function has been changed, I think this has been forgotten to also be changed in the Java file. --- src/android/BackgroundMode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);",