Android中的手机信号塔位置 [英] cell tower location in android

查看:76
本文介绍了Android中的手机信号塔位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在android

How to get cell tower location(address) in android

推荐答案

中获取手机信号塔的位置(地址)您可以执行以下搜索: ^ ] .

如果会告诉您有某些服务,您可以订阅以按地址或其他搜索条件获取位置.

您可以找出是否有Web服务并充当客户端.即使是常规网站,也可以以编程方式(基本上是使用Web浏览器模拟常规用户的行为)执行HTTP请求,以登录并开始搜索,然后获取HTTP响应并进行解析. >
这实际上与 Web抓取中的技术相同:
http://en.wikipedia.org/wiki/Web_scraping [ http://developer.android.com/reference/org/apache/http/client/HttpClient.html [^ ],
http://developer.android.com/reference/java/net/HttpURLConnection.html [ ^ ],
http://developer.android.com/reference/org/apache/http/client/ResponseHandler.html [ ^ ].

我发现的第一个相关代码示例是:
http://stackoverflow.com/questions/2323617/android-httppost-how-获得结果 [ ^ ].

您可以使用上述信息在Google搜索中找到更多关键词.

当您收到HTTP响应时,您将需要解析HTML代码.理想情况下,如果响应是格式正确的XML,则很容易.您可以在此讨论中找到一些示例:
http://stackoverflow.com/questions/2971155/what-is-the-fastest-way-to-scrape-html-webpage-in-android [ http://jsoup.org/ [ ^ ].

—SA
You can do this search: http://bit.ly/AaS4oU[^].

If will show you that there are cervices you can subscribe to to get locations by address or other search criteria.

You can find out if there is a Web service and act as a client. Even if the case of a regular Web site, you can perform HTTP requests programmatically (basically, simulating behavior of a regular user using a Web browser) to log in and start the search, and then get HTTP response and parse it.

This is practically the same technique as in Web scraping:
http://en.wikipedia.org/wiki/Web_scraping[^].

Basically, you would need to use the classes HttpClient or HttpURLConnection and ResponseHandler:
http://developer.android.com/reference/org/apache/http/client/HttpClient.html[^],
http://developer.android.com/reference/java/net/HttpURLConnection.html[^],
http://developer.android.com/reference/org/apache/http/client/ResponseHandler.html[^].

First relevant code sample I''ve found was this one:
http://stackoverflow.com/questions/2323617/android-httppost-how-to-get-the-result[^].

You can find some more using the above information for key words in Google search.

When you get a HTTP response, you would need to parse HTML code. Ideally, it''s easy if the response is a well-formed XML. You can find some samples in this discussion:
http://stackoverflow.com/questions/2971155/what-is-the-fastest-way-to-scrape-html-webpage-in-android[^].

If not, you would need some HTML parser which could deal with some code. You can try this one:
http://jsoup.org/[^].

—SA


这篇关于Android中的手机信号塔位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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