Created
September 26, 2015 13:25
-
-
Save zxshinxz/36b6da59a9e4efa50857 to your computer and use it in GitHub Desktop.
fix local notification
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
change LocalNotification.java | |
both | |
/plugins/de.appplant.cordova.plugin.local-notification/src/android/LocalNotification.java | |
/platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java | |
private static synchronized void sendJavascript(final String js) { | |
if (!deviceready) { | |
eventQueue.add(js); | |
return; | |
} | |
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); | |
} | |
} | |
}); | |
// webView.post(new Runnable(){ | |
// public void run(){ | |
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { | |
// webView.evaluateJavascript(js, null); | |
// } else { | |
// webView.loadUrl("javascript:" + js); | |
// } | |
// } | |
// }); | |
} | |
//THEN DELETE | |
platforms/android/libs/android-support-v4.jar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment