Forum Discussion

clemensw's avatar
6 years ago

How to check if tablet device is used?

Hi,

how can we detect if a user is viewing our community on a tablet (iPad,...)?
I could only find clientDevice.mobile and clientDevice.desktop. Is there also something linke clientDevice.tablet?

Any other possibilities how we can check tablet usage in freemarker?

Thanks,
clemensw

  • clemensw - Technically, Lithium doesn't differ in mobile and tablet, even the LSI matrics for tablets was under mobile, which they later changed, but doesn't seem to be an update with the context objects for the device. You may still want to check with Lithium support.

     

    I hope this helps.

    • luk's avatar
      luk
      Boss

      clemensw not really something you should ever do server-side as this will always rely on User-Agents parsing... and nowadays its probably pretty hard to distinguish a tablet from one of these monster-phones (which are like tablets =D) or laptops with touchscreens, so the question is, why you would even want that? What you should be more interested in are the various screen-sizes/viewports of touch capable devices, both of which you can't really measure from the server, you need JavaScript for that...