I'm not sure you can - they change too often and too quickly. Instead, try using a service such as WURFL or DeviceAtlas , which will analyze the user agent for you and return the phoneβs properties (screen size, browser capabilities, etc.). The likes of WURLF and DeviceAtlas take care of updating their databases of phone user agents.
source share