Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cordova-plugin-local-notifications
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nabil Sadki
cordova-plugin-local-notifications
Commits
e4639908
Commit
e4639908
authored
Jul 02, 2015
by
PKnittel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed webView-Problems with cordova-android 4.0
parent
d8d62068
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
LocalNotification.java
src/android/LocalNotification.java
+13
-9
No files found.
src/android/LocalNotification.java
View file @
e4639908
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
package
de
.
appplant
.
cordova
.
plugin
.
localnotification
;
package
de
.
appplant
.
cordova
.
plugin
.
localnotification
;
import
android.app.Activity
;
import
android.os.Build
;
import
android.os.Build
;
import
org.apache.cordova.CallbackContext
;
import
org.apache.cordova.CallbackContext
;
...
@@ -34,6 +35,7 @@ import org.json.JSONArray;
...
@@ -34,6 +35,7 @@ import org.json.JSONArray;
import
org.json.JSONException
;
import
org.json.JSONException
;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
import
java.lang.reflect.Method
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -557,16 +559,18 @@ public class LocalNotification extends CordovaPlugin {
...
@@ -557,16 +559,18 @@ public class LocalNotification extends CordovaPlugin {
eventQueue
.
add
(
js
);
eventQueue
.
add
(
js
);
return
;
return
;
}
}
Runnable
jsLoader
=
new
Runnable
()
{
webView
.
post
(
new
Runnable
(){
public
void
run
()
{
public
void
run
(){
webView
.
loadUrl
(
"javascript:"
+
js
);
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
KITKAT
)
{
webView
.
evaluateJavascript
(
js
,
null
);
}
else
{
webView
.
loadUrl
(
"javascript:"
+
js
);
}
}
}
});
};
try
{
Method
post
=
webView
.
getClass
().
getMethod
(
"post"
,
Runnable
.
class
);
post
.
invoke
(
webView
,
jsLoader
);
}
catch
(
Exception
e
)
{
((
Activity
)(
webView
.
getContext
())).
runOnUiThread
(
jsLoader
);
}
}
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment