Thanks for bringing this to our attention. Release 6.2.0, which comes out at the end of this month, fixes this.
I was able to reproduce the issue in 5.21.0. It seems to be a bug in the server mechanism where it tries to determine the device type based on the user agent string, or the profile parameter in the url.
If the device type is not yet determined the server seems to default to the desktop device type in the home page microflow. Even on actual mobile devices. This only happens in the home page microflow when visiting the page for the first time or when changing profile.
Please file a ticket, to receive updates about the progress of the fix.
P.S. if you just want to open a different home page for every device type, you could set the device type specific home pages in Navigation instead of using a microflow.
Still broken in version 6.2.0 Homepage works fine (after login flow). All other pages still detected with 'Desktop' value in $currentDeviceType.
I recreated your scenario with 5.21 but didn't experience your issues. The only difference is I didn't try to do it on load of the home page from logging in; I pressed an Action button. I recorded a gif to send you demonstrating but I can't put that in the forum.
As my idea, I think mendix tool provide resolution like phone, tablet etc. but it's not real phone browser. I think you might try to change user
agent in your browser via user-agent switcher (https://chrome.google.com/webstore/detail/user-agent-switcher/ffhkkpnppgnfaobgihpdblnhmmbodake?hl=en)
Refer Mendix view app: This is not an iPhone simulator but just a resized view surrounded with an iPhone image to give an impression of what the app might look like on a phone.
Still broken in Mendix 7.21
Its not working in version 8.9.0 also. Does anyone get this work ?
As I am unable to fetch the currentDeviceType as Phone . It always fetches Desktop even if running on Phone browser