简体   繁体   English

phonegap中的Android后台服务插件

[英]Android background service plugin in phonegap

I am new to phonegap. 我是phonegap的新手。 i want to create a plugin in phonegap using android background services. 我想使用android后台服务在phonegap中创建一个插件。 I need continuously calls to that service after every 5 seconds. 我需要每隔5秒钟不断调用该服务。 Please assist me to do so. 请帮我这样做。 Thanks for your attentions. 谢谢你的关注。

您可以通过使用异步任务来实现此目的。

I am not sure exactly what you need but I accomplished something similar by creating a phonegap pluggin that writes data to a static class where I store the information. 我不确定你需要什么,但我通过创建一个phonegap插件来完成类似的事情,该插件将数据写入我存储信息的静态类。 Then whenever I need to access it from javascript the plugin simply queries the static class. 然后每当我需要从javascript访问它时,插件只是查询静态类。 Is that what you were trying to accomplish? 那是你想要完成的吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM