Detecting Device Type in a web application

前端 未结 8 2313
隐瞒了意图╮
隐瞒了意图╮ 2020-11-28 08:48

We have a Java based application where in we want to detect the device type(mobile or desktop) for the device that is sending the request.

How is it possible?

8条回答
  •  渐次进展
    2020-11-28 09:29

    For Java 51Degrees has a free API on GitHub https://github.com/51Degrees/Java-Device-Detection, it is undated regularly and should be able to cover all the basic detentions that you need.

    There is a tutorial how to use the API for Device Type detection here https://51degrees.com/Developers/Documentation/APIs/Java-V32/Tutorials/Web-App

    There is also a free cloud version that offers the DeviceType Property (if you want more than just IsMobile) you can find the details on this on the 51Degrees website. You will need to "purchase" the free cloud through the website, but it does not ask for bank details and is completely free. You can also use JavaScript and other integration dependant on your requirements.

    Disclosure: I work at 51Degrees.

提交回复
热议问题