Closed MaZZly closed 9 years ago
I can confirm this issue too. Any idea? Btw., MaZZly's workaround works for me also.
same here!
Same here.
Temporarily use this. It works for me.
http://plugins.cordova.io/#/package/jp.wizcorp.phonegap.plugin.localnotificationplugin
I'm receiving same error in Apache Cordova Android 4.0.0
/home/danail/git/app/platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java:495: error: cannot find symbol
webView.evaluateJavascript(js, null);
^
symbol: method evaluateJavascript(String,<null>)
location: variable webView of type CordovaWebView
/home/danail/git/app/platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java:492: error: cannot find symbol
webView.post(new Runnable(){
^
symbol: method post(<anonymous Runnable>)
location: variable webView of type CordovaWebView
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/danail/git/app/platforms/android/src/org/apache/cordova/file/ContentFilesystem.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
FAILED
According to http://cordova.apache.org/announcements/2015/04/15/cordova-android-4.0.0.html, new Android uses first-class support for Crosswalk
same here
Not sure if the issue is about crosswalk or the new cordova release that is building with Gradle instead Ant
local-notification plugin will support Cordova 4 and Crosswalk starting with v0.9
Can you say when? I'm not trying to rush you, I'm asking because I have a project that is using crosswalk and I'm wating this release
I'm also running into this, any timeline on 0.9?
I am also running into this same issue. When do you think 0.9 will be out please ?
Same problem here, I would like to use this plugin with Crosswalk
I have the same problem with cordova 5.0.0
I have the same problem with cordova 5.0.0
+1
+1
+1, same problema with cordova 5.0.0 and android platform version 4.0.0
+1
+1, i also have same issue with cordova 5.0.0 and cordova android platform 4.0.0
is it really necessary to say i have the same problem..? :p
EDIT : This branch worked for me :) https://github.com/DarianLewin/cordova-plugin-local-notifications/tree/issue-535-quick-fix
+1 Crosswalk on Cordova@5.0
+1
+1
+1
Having the same issue without crosswalk
Why this issue was closed?
I am having similar issue with phonegap 4.
This is the issue I get when I try to compile it.
same problem here :(
/cordova/platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java:495: error: cannot find symbol
webView.evaluateJavascript(js, null);
^
symbol: method evaluateJavascript(String,
+1
same here. +1
same
use webView.getView().eva... this should solve your problem.
+1
I got a temporary solution. Hope it works ---
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);
}
}
});
HaPpY CoRdOvIaNs :)
Well the fix makes the project compile.. But when calling the localnotifications functionality the app crashes so it's not really a solution...
+1 same here, no matter what the fix
+1 crosswalk compat. would be nice
+1 same here
+1 Yes please.
+1
+1
I forked one a working versions with crosswalk and removed the events that were crashing the app (basically everything trying to callback to Cordova). Unfortunately I am not into Cordova that much yet so I can implement it correctly.
You will not be able to hook into events, like cordova.plugins.notification.local.on("click", callback .. ). It works for what I need. Perhaps it's enough functionality for some of you until it's fully implemented upstream.
https://github.com/sebasi/cordova-plugin-local-notifications
Cheers, Seb
+1
+1
+1 :( I don't use cordova-plugin-local-notifications but I began to use crosswalk I found it after updating cordova to 5.0.0 and android sdk to 22
+1 - I'm using Cordova 5.0.0.
+1
+1
I think it is a cordova 5 issue. As stated here https://github.com/katzer/cordova-plugin-local-notifications/issues/535 I solved this way I changed LocalNotification.java both /plugins/de.appplant.cordova.plugin.local-notification/src/android/LocalNotification.java /platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java replacing the function in line 554 with
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);
// }
// }
// });
}
With crosswalk it doesn't compile if localnotification plugin is used.
I can get rid of compilation errors by removing the
sendJavascript
function inLocalNotification.java:463
and replacing the 2 calls to it (:419
&:454
) withwebView.sendJavascript(js);
Then it will compile.. Then when calling cancelAll() or scheduledIds() (And maybe others) the app crashes and output is:
[ERROR:runtime_javascript_dialog_manager.cc(69)] Not implemented reached in virtual void xwalk::RuntimeJavaScriptDialogManager::WebContentsDestroyed(content::WebContents*)
Ideas?