Windows Phone应用程序 - 在应用关闭时获取用户的位置 [英] Windows Phone apps - get user's location when app is closed
问题描述
我想构建一个能够每隔几分钟询问用户经度和纬度的应用程序然后我会在应用程序中对该信息执行某些操作。即使应用程序未运行或处于后台,也必须执行此操作。
这可以在Windows Phone上使用吗?我该怎么做呢?
I want to build an app that would be able to ask for the user's longitude and latitude every few minutes and then i would do something with that information in the app. This act has to be performed even when the app isn't running or is in the background. Is this possible on Windows Phone? How would i go about doing it?
这个应用程序基本上会在用户进入 时向用户显示信息基于坐标的某个地方。
This app will basically show information to the user when they go to a certain place based on the coordinates.
推荐答案
是的,可以,你可以利用
后台代理(期间任务) )如果应用程序关闭,它会在一个周期性间隔运行以检索用户位置。
Yes that's possible, you can make use of the Background agent (Period Task) which runs on a recurring interval to retrieve user location if the app is closed.
(还有
Lumia传感器核心SDK )
我希望它有所帮助,
Yassine
I hope it helps,
Yassine
这篇关于Windows Phone应用程序 - 在应用关闭时获取用户的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!