2015-09-04 161 views
1

我有一个sumologic查询,返回基于用户代理的操作系统/浏览器。Sumologic和Android平板电脑

我试图修改此查询来区分移动/平板电脑/桌面。

这对苹果来说非常简单,因为您可以非常轻松地从用户代理获取iPad/iPhone。

现在,对于Android,我无法解决这个问题。

如果我用火柴:

| if (agent matches "*Android Tablet*","Tablet",device) as device 

它看起来像我将获得片(在Android上运行)。

但是,如果我加入这一行:

| if (agent matches "*Android*","Mobile",device) as device 

这将让我的手机和平板电脑...

任何想法如何改变这种:

| if (agent matches "*Android Tablet*","Tablet",device) as device 
| if (agent matches "*Android*","Mobile",device) as device 

得到平板电脑和Android上的移动?

谢谢

回答

0

您可以简单地改变为:

| if (agent matches "*Android*","Mobile",device) as device 
| if (agent matches "*Android Tablet*","Tablet",device) as device