private static synchronized void sendJavascript(final String js) {

        if (!deviceready || weakReferenceCordovaWebView == null) {
            eventQueue.add(js);
            return;
        }

        final CordovaWebView cordovaWebView = weakReferenceCordovaWebView.get();

        ((Activity)(cordovaWebView.getContext())).runOnUiThread(new Runnable() {
            public void run() {
                cordovaWebView.loadUrl("javascript:" + js);
            }
        });
    }
Use this instead of deprecated sendJavascript

@param js JS code snippet as string.
src/android/LocalNotification.java