获取设备特性和网络信息 [英] Getting device characteristics and network information

查看:113
本文介绍了获取设备特性和网络信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个情境感知的移动应用程序。我需要有关于终端设备和网络等特点,当前带宽能力的信息。我的问题是,是否有在Android的访问此信息的API?

I am developing a context aware mobile application. I need to have information about the capabilities of terminal devices and network characteristics such as current bandwidth. My question is, are there APIs in android to access this information?

感谢。

推荐答案

更​​好的问题是,是否有原料药,这些终端设备从外部访问的信息。当然,你可以让你的手机提供商的带宽,但要获得终端设备的这些信息,你需要访问他们的数据。

The better question is, are there APIs for these terminal devices to access the information from outside. Of course you can get the bandwidth of your phone to the provider, but to get that info of the terminal device, you need to access their data.

我建议为一个三路请求。起初,有一个Web服务,您的语言的选择,前PHP,其具有以访问终端装置。该设备具有以某种方式公布自己的数据,所以这是你需要知道的第一点。 那么这个Web服务清理数据,如你需要它,并发布为XML或JSON或什么的。 然后,在你的Andr​​oid应用程序acceess服务来获取信息,并解析到你的应用程序。

I would suggest a three-way request for that. At first there is a webservice, in your language of choice, e.x. PHP, which has to get access to the terminal device. That device has to publish their data somehow, so thats the first point you need to know. Then this webservice cleans the data like you need it and publish it as xml or json or whatever. Then your App in Android acceess the service to get the info and parse it into your app.

有很多职位在这里找到,如何获得一个HTTP请求结果。对于解析XML,你可以在这里找到的东西: http://www.ibm.com/developerworks/opensource/library /x-android/index.html

There are alot posts here to find out, how to get a HTTP Request Result. For parsing XML you can find something here: http://www.ibm.com/developerworks/opensource/library/x-android/index.html

有关访问网络设备与特定端口的这样的东西,你可以使用PHP与功能的fsockopen()

For accessing a network device with a specific port an such stuff, you can use PHP with the function fsockopen()

这篇关于获取设备特性和网络信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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