How to determine what type of device the end user is using.
I would like to be able to determine, within my workflow, what device is being used and then move down a different path if it is using a desktop version of the app or a mobile version. I am running Workflow 5 on top of Web App Builder. Thanks
-
Web AppBuilder gives some indication on whether or not it is running on a mobile device based on the size of the browser window. The default threshold is 600 pixels. I believe if either the width or the height is smaller than this, it switches to "mobile mode". (You should be able to test this by resizing a browser window on desktop.)
I realize this is not strictly "on mobile" but usually the reason for the difference in behaviour is the smaller space available.
When in "mobile mode" you will see the class of "jimu-ismobile" in certain elements of the page. Also, in JavaScript you can check this:
appInfo.isRunInMobile0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
1 kommentar