function analyseBrowserId($id) { $browser = BrowserIds::identify('android', $id); if ($browser) { if (!isset($this->browser->name)) { $this->browser->name = $browser; } else { if (substr($this->browser->name, 0, strlen($browser)) != $browser) { $this->browser->name = $browser; $this->browser->version = null; $this->browser->stock = false; } else { $this->browser->name = $browser; } } } /* The X-Requested-With header is send by the WebView, so our browser name is Chrome it is probably the Chromium WebView which is sometimes misidentified. */ if (isset($this->browser->name) && $this->browser->name == 'Chrome') { $this->browser->stock = true; $this->browser->name = null; $this->browser->version = null; $this->browser->channel = null; } /* The X-Requested-With header is only send from Android devices */ if (!isset($this->os->name) || $this->os->name != 'Android' && (!isset($this->os->family) || $this->os->family != 'Android')) { $this->os->name = 'Android'; $this->os->alias = null; $this->os->version = null; $this->device->manufacturer = null; $this->device->model = null; $this->device->identified = ID_NONE; if ($this->device->type != TYPE_MOBILE && $this->device->type != TYPE_TABLET) { $this->device->type = TYPE_MOBILE; } } /* The X-Requested-With header is send by the WebKit or Chromium Webview */ if (!isset($this->engine->name) || $this->engine->name != 'Webkit' && $this->engine->name != 'Blink') { $this->engine->name = 'Webkit'; $this->engine->version = null; } }
function analyseBrowserId($id) { $browser = BrowserIds::identify('android', $id); if ($browser) { if (!isset($this->browser->name) || $this->browser->name != $browser) { $this->browser->name = $browser; if (substr($this->browser->name, 0, strlen($browser)) != $browser) { $this->browser->version = null; $this->browser->stock = false; } } } if ($this->os->name != 'Android' && $this->os->name != 'Aliyun OS') { $this->os->name = 'Android'; $this->os->version = null; $this->device->manufacturer = null; $this->device->model = null; $this->device->identified = ID_NONE; if ($this->device->type != TYPE_MOBILE && $this->device->type != TYPE_TABLET) { $this->device->type = TYPE_MOBILE; } } if ($this->engine->name != 'Webkit') { $this->engine->name = 'Webkit'; $this->engine->version = null; } }