diff --git a/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboard.java b/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboard.java index 7d731f2b63d..2bffa482d9e 100644 --- a/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboard.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboard.java @@ -366,9 +366,8 @@ public void loadJavascript(String func) { public void callJavascriptAfterLoad() { if(this.javascriptAfterLoad.size() > 0) { - // Don't call this WebView method on just ANY thread - run it on the main UI thread. - // https://stackoverflow.com/a/22611010 - this.postDelayed(new Runnable() { + Handler handler = new Handler(); + handler.postDelayed(new Runnable() { @Override public void run() { StringBuilder allCalls = new StringBuilder();