如何写一个后台服务来获取经纬度? [英] How to write a background service to get latitude and longitude?

查看:138
本文介绍了如何写一个后台服务来获取经纬度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要写一个后台服务来获取经纬度值。我有一个Android应用程序中,它必须寻找到用户当前。有没有什么方法以编程方式从系统服务的经度和纬度值(或程序)?

I need to write a background service to get latitude and longitude values. I have an Android application in which it has to find where the user is currently. Is there any way to programmatically get the latitude and longitude values from the system services (or some program)?

推荐答案

使用的LocationManager 。该文档涵盖这一点。

这篇关于如何写一个后台服务来获取经纬度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆