Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在给定设备型号、操作系统或浏览器版本的情况下,我需要确定用户代理。是否有任何 WURFL api 可以很容易地用于此目的?还有别的图书馆吗?请指出我各自的代码片段。
谢谢,
我终于找到了解决方案。Device接口中定义了getUserAgent方法。
WURFLUtils utils = wurflEngine.getWURFLUtils(); Set<ModelDevice> mds = utils.getAllModelDevices(); for (ModelDevice md : mds){ System.out.println(md.getUserAgent()); }