Phonegap应用程序问题

时间:2013-08-19 21:34:02

标签: cordova

我正在开发一个应用程序,在超时时更新db上的一些数据,从而更改页面上相对于数据的视图。该应用程序在chrome和firefox上完美运行,但是当它在设备上运行时,此数据不会更新,但在db上更新。也许内存缓存问题? 这行可能有错误?也许是“$(窗口)”?

current_user.Set_last_activity();
$(window).bind('onload',setInterval(function(){current_user.Set_last_activity();},5000));
this.check_users_online() ;
$(window).bind('onload', setInterval(function(){self.check_users_online();},5000));
logcat中的

出现了这个错误:

08-20 00:12:57.023: E/SUMAN-statusbarpolicy(1658):     
<!>com.android.systemui.statusbar.policy.StatusBarPolicy 1069<!>  
mServiceState.getRoaming()false

1 个答案:

答案 0 :(得分:0)

Cordova应用程序需要声明他们计划从哪个URL提取数据。此已知主机名列表是“白名单”。

您的浏览器可能更灵活,但Cordova需要白名单条目。

这是documentation on adding a domain to your whitelist

=编辑=

尝试绑定deviceready事件而不是onload事件。

相关问题