How to send GPS data to server every 5 minutes?

青春壹個敷衍的年華 提交于 2019-12-11 05:32:22

问题


I am planning to write WP7 app, which needs to send to server phones GPS position every 5 minutes. Data must be sent to server even if app is not running. One way to do that is to use Background agents (I am using 7.5 Mango), but in that case app will send data only every 30 minutes, which is not acceptable in my case.
Is there any other solution?
Thanks in advice.


回答1:


No, this is not a supported usecase for WP7 apps on Mango. Also, it's important to mention that the location you'll get for GeoCoordinateWatcher on a background agent is a cached geolocation from approximately the last 15 minutes and not the real-time geolocation.

What exactly are you trying to build if you don't mind me asking? This sounds oddly close to spyware. Even if it's innocuous and meant for a good purpose, I'd be careful walking in any direction that constantly shares GeoLoc with a remote server.




回答2:


Your only choices are sending the data every 5 minutes while application is running (even when the phone is locked) and/or send the data once every 30 minutes by registering a PeriodicTask.

Having said that, I agree with Justin in that what you are describing sounds nefarious.



来源:https://stackoverflow.com/questions/9060429/how-to-send-gps-data-to-server-every-5-minutes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!