Mobile features

Content Type: Widget
Categories: Mobile

Overview

This widget adds nice native features to a your Mendix hybrid mobile app. It includes page transitions, native spinner & dialog, connection/platform classes, and statusbar adjustments

Documentation

Mobile Features Widget

Mobile Features widget can be placed in a page layout and used in mobile hybrid applications. This widget is heavily based on MobileNativeFeatures from Eric Tieniber. The difference with this widget is that it packs multiple features in one single widget.

Features

This widget includes the following features that can be used in a Mendix mobile hybrid application

  • Transitions: transition between pages using transitions
  • Numeric input: Set an input field to numeric, triggers numeric keyboard on mobile devices
  • Dialog: info, warning, and error messages will be shown using native dialog boxes
  • Spinner: instead of the Mendix default loading dots, use the native loading spinners for your device
  • Statusbar: set the text color and background of the status bar (i.e, the bar with time and other settings)
  • Custom Connection Error: Show a bar on top of the window when a connection error occurs (instead of a normal warning dialog) (Work in progress)
  • Custom body classes:
    • online/offline: When the app goes offline, it will add a configurable class to the body of the page
    • android/ios: Depending on the platform, it will add a configurable class to the body of the page (used for styling per platform)

Tested on Mendix version: 7.0.2, should work in Mendix 6 as well

Typical usage scenario

The widget is designed to be dropped on your master mobile page template. It overrides functions in the Mendix UI code to hook into Cordova plugins. The features above (with the exception of body classes) can be switched on/off.

Dependencies

Be sure that these Cordova plugins are included in your PhoneGap config.xml file. Without these, some features will not work:

Transitions

    <gap:plugin name="com.telerik.plugins.nativepagetransitions" source="npm" />
    <!-- This needs to be added to make sure the cordova-plugin-crosswalk-webview animates correctly -->
    <preference name="CrosswalkAnimatable" value="true" />

Dialog

    <gap:plugin name="cordova-plugin-dialogs" source="npm" version="1.2.1" />

Spinner

    <gap:plugin name="cordova-plugin-spinner" source="npm" />

Statusbar

    <gap:plugin name="cordova-plugin-statusbar" source="npm" version="2.1.3" />

Configuration

Spinner

This feature will override the normal Mendix spinner (loading dots) with a native mobile one.

Dialog

This feature will override the normal Mendix dialog with a native mobile one.

Transitions

Transition classes

Classes

Statusbar

Connection Error

This feature is planned for a next version

Releases

Version: 1.5.0
Framework Version: 7.0.2
Release Notes: - Now the default titles of the dialogs confirmation, info, warn and error are localised based on the system text - We fixed the button text null in a delete confirmation (Support ticket #88273, GitHub issue #13)
Version: 1.4.3
Framework Version: 7.0.2
Release Notes: - Now the progress spinner is shown again when changing pages (Fixes Support Ticket #82258, GitHub Issue #20)
Version: 1.4.2
Framework Version: 7.0.2
Release Notes: Improved online/offline detection (Fixes Support Ticket #80756 and #80369)
Version: 1.4.1
Framework Version: 7.0.2
Release Notes: - #16 Fix cancel handler feedback in confirmation plugin
Version: 1.4.0
Framework Version: 7.0.2
Release Notes: - Fix issues with spinners between pages that have a layout with MobileFeatures - Fix issue where transitions are not triggered on action buttons with a Microflow that is blocking
Version: 1.3.5
Framework Version: 7.0.2
Release Notes: - PR #11 Fix debug/logging
Version: 1.3.4
Framework Version: 7.0.2
Release Notes: - Added PR #10: Fix group box lazy loading with dynamic caption
Version: 1.3.3
Framework Version: 7.0.2
Release Notes: - Update Icon in modeler
Version: 1.3.2
Framework Version: 7.0.2
Release Notes: - Fix issue with leftover code from version 1.3.1
Version: 1.3.1
Framework Version: 7.0.2
Release Notes: - Fix lazy list view, should disable when listview has class `disable-lazy`