浏览代码

Invoke background callback in own thread

Sebastián Katzer 12 年之前
父节点
当前提交
5b19603366
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/android/ReceiverActivity.java

+ 1 - 1
src/android/ReceiverActivity.java

@@ -70,7 +70,7 @@ public class ReceiverActivity extends Activity {
         // after reboot, LocalNotification.webView is always null
         // after reboot, LocalNotification.webView is always null
         // may be call background callback later
         // may be call background callback later
         if (function != null && LocalNotification.webView != null) {
         if (function != null && LocalNotification.webView != null) {
-            LocalNotification.webView.sendJavascript(function + "(" + options.getId() + ")");
+            LocalNotification.webView.sendJavascript("setTimeout('" + function + "(" + options.getId() + ")',0)");
         }
         }
     }
     }
 }
 }