简体   繁体   English

使用Javascript获取移动设备上下文参数

[英]Getting Mobile Device Context Parameters Using Javascript

Is there any way through which one can get Mobile Device Context parameters like Battery level, Processor speed, Network Bandwidth etc through Javascript. 有什么方法可以通过Javascript获得移动设备上下文参数,例如电池电量,处理器速度,网络带宽等。 I am working on a Mobile Analytic tool and need these parameters to process and present solution in a UI considering these fields. 我正在使用移动分析工具,需要这些参数才能在考虑这些字段的情况下在UI中处理和提出解决方案。

Support for the HTML5 Battery Status API is limited (Firefox and Chrome). 对HTML5电池状态API的支持是有限的(Firefox和Chrome)。 See this recent tutorial on SitePoint. 请参阅有关SitePoint的最新教程。 http://www.sitepoint.com/html5-battery-status-api/ http://www.sitepoint.com/html5-battery-status-api/

Here's another article from SitePoint re: the Network Information API. 这是SitePoint的另一篇文章:网络信息API。 That also has limited support (Firefox and Chrome). 那也有有限的支持(Firefox和Chrome)。 http://www.sitepoint.com/use-network-information-api-improve-responsive-websites/ http://www.sitepoint.com/use-network-information-api-improve-sensitive-websites/

I am unaware of any accurate, cross-browser method to determine processor/hardware information via JavaScript. 我不知道任何通过JavaScript确定处理器/硬件信息的准确的跨浏览器方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM