User agent is_mobile function always returns true |
Does anyone know what could be causing this? Everytime I want to find out if a device is a mobile device or not I get a big fat YES from the codeigniters is_mobile function!
I do $this->agent->is_mobile() and on my desktop I get true. I write $this->agent->mobile() and I get "Windows Phone"... Even though I am using win7 OS on a desktop computer. It seems function detects windows and thinks I am using windows phone. From the user_agents.php: PHP Code: // Phones and Manufacturers
I know this is cheating, but when I was wanting to use the user agent data with CI 2.2.0, it was so out of date, I went to the CI 3 github repository and copied the code out.
Be careful not to copy all the definitions as a single file, but to take it block by block as they are different. I hope this helps. |
Welcome Guest, Not a member yet? Register Sign In |