Loading src/android/LocalNotification.java +7 −1 Changes for src/android/LocalNotification.java: 7 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import java.util.Map; import java.util.Set; import org.apache.cordova.CallbackContext; import org.apache.cordova.CordovaInterface; import org.apache.cordova.CordovaPlugin; import org.apache.cordova.CordovaWebView; import org.json.JSONArray; Loading Loading @@ -53,10 +54,15 @@ public class LocalNotification extends CordovaPlugin { public static Context context = null; @Override public boolean execute (String action, JSONArray args, CallbackContext callbackContext) throws JSONException { public void initialize (CordovaInterface cordova, CordovaWebView webView) { super.initialize(cordova, webView); LocalNotification.webView = super.webView; LocalNotification.context = super.cordova.getActivity().getApplicationContext(); } @Override public boolean execute (String action, JSONArray args, CallbackContext callbackContext) throws JSONException { if (action.equalsIgnoreCase("add")) { JSONObject arguments = args.optJSONObject(0); final Options options = new Options(context).parse(arguments); Loading Loading
src/android/LocalNotification.java +7 −1 Changes for src/android/LocalNotification.java: 7 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import java.util.Map; import java.util.Set; import org.apache.cordova.CallbackContext; import org.apache.cordova.CordovaInterface; import org.apache.cordova.CordovaPlugin; import org.apache.cordova.CordovaWebView; import org.json.JSONArray; Loading Loading @@ -53,10 +54,15 @@ public class LocalNotification extends CordovaPlugin { public static Context context = null; @Override public boolean execute (String action, JSONArray args, CallbackContext callbackContext) throws JSONException { public void initialize (CordovaInterface cordova, CordovaWebView webView) { super.initialize(cordova, webView); LocalNotification.webView = super.webView; LocalNotification.context = super.cordova.getActivity().getApplicationContext(); } @Override public boolean execute (String action, JSONArray args, CallbackContext callbackContext) throws JSONException { if (action.equalsIgnoreCase("add")) { JSONObject arguments = args.optJSONObject(0); final Options options = new Options(context).parse(arguments); Loading