Detect Touchscreen / users on mobile-tablet

Hello all!

I would like to detect if users are on Desktop or tablet. So a way to do this seems to detect touchsreen. i’ve found this here : How to Detect Mobile Browsers with JavaScript - Stack Diary

An idea of how to use it with Bubble and set conditional based on this ?

Thanks !

A way this might work is;

  • Initiate a click event when the device is detected
  • Let the click event be on a workflow that fills a custom state or something
  • Set conditionals based on the custom state

If more context is provided, I may review the above to make it more relevant. Hope it helps.

Thanks for your help. the thing I wonder is how to detect if device has a touchscreen or if it is mobile with some javascript I think.

Hey, another easy approach to identify device would be to simply use “Current page width” conditionals . But if you really want to check if they are using a touch device, then javascript is the way to go.

yes, that’s was I used, page width. But, some desktop has old screen with low resolution… So the touchscreen detection was a way to be more accurate :slight_smile:

I ended by using this plugin : Device Detector Plugin | Bubble


This topic was automatically closed after 70 days. New replies are no longer allowed.