0

I was using this plugin for cordova local notification. Since cordova 5.0.0 with android@4.0.0 was released it does not work anymore. I found the bug here.

Is there a way to temporarily solve it?

Thanks

Frank
  • 2,083
  • 8
  • 34
  • 52

2 Answers2

1
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);
    }
  }
});
Faizan Shakeel
  • 171
  • 1
  • 16
0

i did a quick solution https://github.com/ivanhuay/cordova-plugin-local-notifications

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

i still have problems in some projects: UNEXPECTED TOP-LEVEL EXCEPTION but it work for me in a new project

percho
  • 66
  • 1
  • 3