Location-aware applications on WP7.5

2019-09-14 17:31发布

I would like to create a location-aware application on WP7.5

Is it possible to automatically get a trigger on location change without our application running on background?

For example:

I would like to know if a user has moved in a new location. If the user has moved I would like to trigger a specific event from my application. My only concern is that if I do that from my application I will consume a significant amount of battery. Is it a specific WP7 service which can inform my application that the user has changed his location and trigger an event from my application?

If it is possible can you please point me an example?

1条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-09-14 17:51

You can make 2 thinks:

  • Use Periodic Agent to get geoposition every 30 minuts
  • Use GeoCoordinateWatcher inside your app and set MovementThreshold to get data only when position really changed. This way will work only if your app is actually running on the device - when user left the application watcher will stop working.
查看更多
登录 后发表回答