I am using WURFL service to detect devices using user agent. I have got one weird user agent as follow:
Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Xbox; Xbox One) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/13.10586
WURFL service detects this device as xbox and returns os as android which is invalid. I searched for xbox user agents. None of them contain Android.
Is above mentioned user agent invalid?
Is it not xbox, someone has just customized to look like xbox? I am confused.
Also, what is the best way/regex to check if a user agent is of xbox?
Any help is appreciated. Thank you in advance.
Okay here is the thing. The Microsoft Edge browser which is latest in line of mobile browsers developed by Microsoft uses the mentioned User-Agent
to pose like an Android device.
So it might be a valid string. But numerous sources I checked doesn't involve Android as OS and Xbox as device in same string. So better not to trust such suspicious user agents.
Well to answer how to detect an xbox user agent string you will have to match xbox
somewhere in it.