如何查询WURFL信息
wurfl 中查询设备功能的编程接口是什么?
What is the programming interface to querying device capabilities in wurfl?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
wurfl 中查询设备功能的编程接口是什么?
What is the programming interface to querying device capabilities in wurfl?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(7)
WURFL 创建者在这里。 ScientiaMobile 最近推出了一种新方法,使 WURFL 可供开发人员使用。我建议你查看 http://wurfl.io/
简而言之,如果你导入一个很小的 JS 文件:
您将得到一个如下所示的 JSON 对象:(
当然,假设您使用的是 Nexus 7)并且您将能够执行以下操作:
这就是您正在寻找的。
2023 年 5 月编辑:
这是很多年后的事了,但它确实为我原来的答案增加了一个新的维度。 ScientiaMobile 最近推出了一款名为 WURFL Query REST API(简称 QuWURFL)的新产品(其中包括免费版本),它正好解决了这个问题。您不仅可以使用全套 HTTP 标头查询 WURFL,而且现在还可以基于 WURFL 功能及其值创建成熟的查询。
https://docs.scientiamobile。 com/documentation/cloud/getting-started-with-wurfl-wurfl-query-rest-api
您现在可以提出诸如“给我 2010 年至 2020 年间摩托罗拉发布的所有平板电脑”之类的问题。将此服务与上述 WURFL.js 结合使用可能是将设备智能集成到应用程序或面向客户的 Web 应用程序中的好方法。
就像 WURFL.js 一样,QuWURFL 也提供免费版本和高级版本。
免责声明:我为提供此免费服务的公司工作。谢谢。
WURFL Creator here. ScientiaMobile recently launched a new way to make WURFL available to developers. I advise you check out http://wurfl.io/
In a nutshell, if you import a tiny JS file:
you will be left with a JSON object that looks like:
(that's assuming you are using a Nexus 7, of course) and you will be able to do things like:
This is what you are looking for.
Edit May 2023:
This comes a lot of years later, but it really adds a new dimension to my original answer. ScientiaMobile recently launched a new product (which includes a free version) called WURFL Query REST API (or QuWURFL for short) that exactly addresses the question. Not only can you query WURFL with a full set of HTTP headers, but you can now also create fully-fledged queries based on WURFL capabilities and their values.
https://docs.scientiamobile.com/documentation/cloud/getting-started-with-wurfl-wurfl-query-rest-api
You can now ask questions like "give me all tablets released by Motorola between 2010 and 2020". Using this service in connection with the aforementioned WURFL.js might be a great way to integrate device intelligence into an app or a customer-facing web application.
Just like WURFL.js, also QuWURFL offers both a free and a premium version.
Disclaimer: I work for the company that offers this free service. Thanks.
我会推荐用于 PHP 和 Java 的 Tera-WURFL。 MySQL。请访问Tera-WURFL 网站查看。
I would recommend Tera-WURFL for PHP & MySQL. Check it out at the Tera-WURFL Website.
对于 Python,我推荐 pywurfl。您可以在此处了解有关如何使用它的更多信息。
For Python, I recommend pywurfl. You can read more on how to use it here.
有适用于 Java、PHP 和 .NET 的 API,所有这些都以相当混乱的方式列在此处。我知道 Java API 非常好,我不知道其他的 API 有多好。
There are APIs for Java, PHP and .NET, all listed in a rather chaotic fashion here. I know the Java API is pretty good, I have no idea how good the others are.
取决于您将使用的语言。官方的java、php和.NET api都相当不错。
Depending to the language you will use. The official java,php and .NET api are pretty good.
一个简单的 .NET Wurfl API 示例:
更重要的是,一旦您获得了信息,它的可靠性如何以及哪些功能有用?
A simple .NET Wurfl api example:
More importantly, once you have the info, how reliable is it and what capabilities are useful?
对于 .NET,我们一直在此处使用 51 Degrees 解决方案:51 Degrees
请记住,WURFL 许可最近已在如果它适用于您。
For .NET, we've been using the 51degrees solution here: 51 Degrees
Keep in mind that the WURFL licencing has recently changed in case it applies to you.