[英]Mobile Web application running when screen is off?
I'm considering building a mobile Web application, using Jquery Mobile that will be used to track truck delivery. 我正在考虑使用Jquery Mobile构建移动Web应用程序,该应用程序将用于跟踪卡车的运送。
I want to be able to periodically send gps coordinates back to the server? 我希望能够定期将gps坐标发送回服务器吗? Can this be done if the screen is off?
如果屏幕关闭,可以这样做吗?
If not can some alternate approaches be suggested.. 如果不能,可以建议一些替代方法。
If you are good in javascript and html you can go for phonegap. 如果您精通JavaScript和html,则可以使用phonegap。 this framework will work like a native application and running from webview like browser.
该框架将像本机应用程序一样工作,并从类似浏览器的webview运行。 Since phonegap is a cross platform framework you can make your app compatible to many devices like windows phone, Apple, Android.
由于phonegap是跨平台框架,因此您可以使您的应用与Windows Phone,Apple,Android等许多设备兼容。 To know more about phonegap or cordova click here
要了解有关phonegap或cordova的更多信息,请单击此处
And yes phonegap does many function or features that can customize your application in many way. 是的,phonegap具有许多可以通过多种方式自定义应用程序的功能。 for example "WAKE LOCK" which keeps your application awake till you force close it.
例如“唤醒锁定”,它可以使应用程序保持唤醒状态,直到您强制关闭它为止。
or if you are using browser you can not run your code for long since browser is a big application android or your mobile system will close it. 或者,如果您使用的是浏览器,则由于浏览器是android上的大型应用程序,否则您的代码无法运行很长时间,否则您的移动系统会关闭它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.