What Mike is saying, but it has already also been created:
For example in this module you have these kind of javascript checks.
https://marketplace.mendix.com/link/component/119777
You could build a Javascript action to detect this. Here is an article to get started with that: https://medium.com/simplejs/detect-the-users-device-type-with-a-simple-javascript-check-4fc656b735e1
Once you create a Javascript action, you can call it in a Nanoflow. Here is the Mendix documentation about how to create a Javascript Action: https://docs.mendix.com/refguide/javascript-actions/