Mobile phone discovery

What is a good / accurate way to detect mobile phones mobile phones programmatically?

+4
source share
6 answers

Checking the value of a user agent is the most common way; there are several open source solutions that do this for you. Try Google for them.

Here is one example: http://detectmobilebrowser.com/

And here is one interesting solution:
http://mobiforge.com/developing/story/lightweight-device-detection-php

+2
source

I can recommend WURFL for this. This is an XML file describing the capabilities of thousands of mobile devices and combined with APIs available for .NET, Java, PHP, etc., which can recognize which device it is based on the characteristics of the request (primarily the user agent header).

The web page is a bit chaotic and needs to be updated, but the database itself and the API are very simple.

+2
source

There are services that can do this for you. http://www.handsetdetection.com/ is a relief.

+1
source

It looks like you have to use the User Agent string. A decent list (although not necessarily updated) can be found here .

0
source

Two header parameters were detected to detect the handset.

  • User agent - a string to determine which application or system is accessing another system.
  • UAProf - An RDF format URL that describes the capabilities of the handset.

Please refer to this simple example (Restlet):

http://shengchien.blogspot.com/2010/09/restful-mobile-detection.html

0
source

If you have a User-Agent, you can use the following modules, I use modules for Python:

  • https://github.com/tobie/ua- To analyze the User-Agent, you will receive information about the name and phone number of the provider (tablets / mobile phones). You can transfer this information to the next module to get information about the phone.

  • https://handsetdetection.readme.io/v4/docs You need to log in and get the user ID, secret key and site ID from the site after logging in. Secondly, create a configuration file preferably yaml and set the attributes. Now you can grammarize it, as well as get information about the device and use it as you can. Thank you

-1
source

Source: https://habr.com/ru/post/1306683/


All Articles