801.796.BROS (2767)


Lectora has some great features to take learning off the desktop and on the road, such as dynamic templates for mobile layout, but one of the more interesting ways is the ability to check the platform type as a condition for an action.

One of the main reasons to use this condition is that mobile devices forbid automatic playing of audio or video. This makes sense; you don’t want to use data without consent. Checking for platform “iPad” would let you show a button overlay to play the media so the user would have to click it to start the page.

Unfortunately, the platform “iPad” does not cover all mobile devices. In fact, there are other types such as iPhone, or Android that need to be accounted for, and there may be more in the future! For instance, the Samsung Galaxy Android OS platform type is “linux armv7I.”  If you want to check the platform type for any device, you can go to this address: http://www.transitionweb.co.uk/mobile/index.html

But rather than compile a list of mobile types to check for, a better way would be to check for the reverse, whether the platform is a desktop. The platform types containing “Mac” and “Win” are pretty stable (“MacIntel” and “Win 32” are the full names), so if you determine those are present, you can present the page with autoplay of media. Just a note about Linux; one test showed the Linux desktop OS type as “Linux x86_64.” Since the platform type is case sensitive, “Linux” should be differentiated from the Android “linux,” but another way to check for this version of Linux would be a condition of “contains x86,” or “contains 64.” Testing may be required to cover all the potential Linux types for your students.

In this example, I’ve created a variable called “checkPlatform.” An action on show of page then has three conditions to check whether “Platform” includes “Mac,” “Win,” or “x86” and if present, sets the variable to “1,” and if not, sets it to “0.” Since this is a top-level action, the platform type is checked each time a page is loaded, and additional platform types can be added as needed in just this one place.

On each page, there is a group with an overlay that includes a PNG to shade the content, and a button with two actions, one to play the audio, the other to hide the group. A page-level action shows the audio overlay only if “checkPlatform” is set to “0.”

Now the course is ready for whatever mobile platform comes its way!


If you enjoyed this post, make sure to check out Adam Leibler’s speech at the Lectora Conference in Nashville on April 29-30. Click here for more information on Adam’s session, “Creating Interactive, Immersive Learning for PC and Mobile Use.”

Pin It on Pinterest