{"action":"created","issue":{"url":"https://api.github.com/repos/oalders/http-browserdetect/issues/129","repository_url":"https://api.github.com/repos/oalders/http-browserdetect","labels_url":"https://api.github.com/repos/oalders/http-browserdetect/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/oalders/http-browserdetect/issues/129/comments","events_url":"https://api.github.com/repos/oalders/http-browserdetect/issues/129/events","html_url":"https://github.com/oalders/http-browserdetect/issues/129","id":154714824,"number":129,"title":"This Kindle Fire doesn't get detected as such","user":{"login":"akarelas","id":423822,"avatar_url":"https://avatars.githubusercontent.com/u/423822?v=3","gravatar_id":"","url":"https://api.github.com/users/akarelas","html_url":"https://github.com/akarelas","followers_url":"https://api.github.com/users/akarelas/followers","following_url":"https://api.github.com/users/akarelas/following{/other_user}","gists_url":"https://api.github.com/users/akarelas/gists{/gist_id}","starred_url":"https://api.github.com/users/akarelas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akarelas/subscriptions","organizations_url":"https://api.github.com/users/akarelas/orgs","repos_url":"https://api.github.com/users/akarelas/repos","events_url":"https://api.github.com/users/akarelas/events{/privacy}","received_events_url":"https://api.github.com/users/akarelas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-05-13T13:43:30Z","updated_at":"2016-05-16T16:18:51Z","closed_at":null,"body":"```\r\nMozilla/5.0 (Linux; U; Android 2.3.4; en-us; Kindle Fire Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Safari/533.1\r\n```\r\n$ua->kindlefire == 0\r\n\r\nWhereas MY test detects it as such:\r\n```perl\r\nmy $is_amazon = $ua->android && ($ua->silk or $ua_string =~ /\\bKF[A-Z]+\\s+Build\\// or $ua_string =~ /\\bkindle\\b/i);\r\n$is_amazon == 1;\r\n```\r\n\r\nI found this user-agent string here: https://developer.amazon.com/public/solutions/devices/fire-tablets/specifications/04-user-agent-strings"},"comment":{"url":"https://api.github.com/repos/oalders/http-browserdetect/issues/comments/219469995","html_url":"https://github.com/oalders/http-browserdetect/issues/129#issuecomment-219469995","issue_url":"https://api.github.com/repos/oalders/http-browserdetect/issues/129","id":219469995,"user":{"login":"andrewmoise","id":8404538,"avatar_url":"https://avatars.githubusercontent.com/u/8404538?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewmoise","html_url":"https://github.com/andrewmoise","followers_url":"https://api.github.com/users/andrewmoise/followers","following_url":"https://api.github.com/users/andrewmoise/following{/other_user}","gists_url":"https://api.github.com/users/andrewmoise/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewmoise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewmoise/subscriptions","organizations_url":"https://api.github.com/users/andrewmoise/orgs","repos_url":"https://api.github.com/users/andrewmoise/repos","events_url":"https://api.github.com/users/andrewmoise/events{/privacy}","received_events_url":"https://api.github.com/users/andrewmoise/received_events","type":"User","site_admin":false},"created_at":"2016-05-16T16:18:51Z","updated_at":"2016-05-16T16:18:51Z","body":"Okay, I read Amazon's web site for a while and I think I figured it out. I _was_ missing something; that \"mobile\" entry indicates a Kindle Fire tablet configured to pretend it's a mobile device. Fire Phones are a different issue.\r\n\r\nThe code in my pull request does correctly distinguish between tablet, desktop, and mobile for Kindle Fire devices depending on what they've been configured to pretend to be. It doesn't always correctly identify the device; a Kindle Fire configured to pretend to be a desktop will set its user agent like a Linux system with a Silk browser, and that's what we report to the user, which in my opinion is what we should be doing. If the web user is pretending to be a desktop, I think we should honor that pretense in what we report, so that the interface the web user sees is appropriate to what they want.\r\n\r\nI don't really see harm in setting kindlefire() for any case where the user agent is recognizably identifying itself as such; I'll amend the pull request to do that. We're not setting kindlefire() in all cases right now. I think though that for what you want (\"Is this an Amazon branded device?\"), probably `$ua->kindlefire || $ua->silk` is actually what you should be doing. You're going to need to do that anyway to catch Fire Phones (which in the current interface wouldn't have kindlefire() set)."}}