cordova 升级后本地通知插件损坏

Local notification plugin broken after cordova upgrade

我正在使用 this 插件进行 cordova 本地通知。 由于带有 android@4.0.0 的 cordova 5.0.0 已发布,因此它不再起作用。 我发现了错误 here.

有什么办法可以暂时解决吗?

谢谢

我做了一个快速的解决方案https://github.com/ivanhuay/cordova-plugin-local-notifications

尝试cordova plugin add https://github.com/ivanhuay/cordova-plugin-local-notifications#build_android_solution

我在某些项目中仍然遇到问题:UNEXPECTED TOP-LEVEL EXCEPTION 但它在一个新项目中对我有用

Quick fix is to modify the block starting at LocalNotification:492 with the following:

webView.getView().post(new Runnable(){
  public void run(){
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
      webView.sendJavascript(js);
    } else {
      webView.loadUrl("javascript:" + js);
    }
  }
});