6 questions you missed in our mobile development webinar
6 questions you missed in our mobile development webinar by Adam Fothergill
Every month, our expert services team hosts a webinar on topics that interest our developer community. And during each of these expert webinars, we receive a number of excellent questions. We can’t get to all of them due to time constraints, but we can share the answers to those missed questions post event.
Question 1: When you use a split in a Microflow on Device Type, does it detect the actual hardware type, or does it use the ‘?device=phone’ from the URL?
The ‘$currentDeviceType’ enumeration is set by default by detecting the browser and using that information to set the proper value. However, if the URL is set to use a different device type (e.g. navigating to http://myappurl/?device=desktop on a phone), this will take precedence. You can test this yourself by opening your app on different device types and appending ‘?device=phone’ or ‘?device=desktop’ to your URL and observing what happens.
Question 2: Can I publish my app to the proper App Stores when running on premises?
Yes! As long as you configure your app to allow for mobile access, and the app is available from a wireless connection, your app can be made available through the proper stores (Windows, Google Play, and Apple App Stores). For a step-by-step guide to do so, please read this How To article.
Question 3: With each new device, it’s becoming difficult to determine the differences between phone and tablet experiences. Might it be possible to let the user choose the type of interface?
The Mendix DX Release makes it much easier to create responsive pages that can fit to any screen size – phone, tablet, or desktop. This can help resolve this problem, as the pages will adjust to be functional on a ‘phablet’ size screen.
If you have specific functionality for specific device types (i.e. data entry on a phone, and data processing on a tablet), you may want the flexibility of switching between modes when using a ‘phablet’ size device. In this scenario, you could create your own DeviceType enumeration and associate it to a user account. Upon logging into the app, you could default your DeviceType enumeration to be equal to $currentDeviceType and show that form. You could then allow the user to switch the DeviceType and use that enumeration rather than the $currentDeviceType to decide what pages to show.
Question 4: Can my existing application with responsive UI’s be built as a native app?
With Mendix, you can create hybrid mobile apps – these are not truly native apps, but apps that can access native functionalities. Mendix made this decision for a few reasons, outlined here. These hybrid apps can be published to the relevant app stores and use PhoneGap to access the native functionalities a traditional web app could not.
Question 5: Can I use CSS3 transitions and animations on my mobile pages?
The support for different versions and features of CSS is going to depend on your device – since CSS is interpreted by the browser the application is opened with, the browser must know what to do with the desired CSS properties. There are some good resources for testing mobile compatibility with CSS3 here, and it appears that most of the CSS3 properties should be available on most devices.
Question 6: Is there a sample app which I can download from the Mendix App Store?
There are several! You can view the Employee Directory, Company Expenses, Survey Builder, and Telco Field Service applications in the Mendix App Store, which all have mobile components already built-in. These are great examples of how to develop mobile functionality in Mendix projects.