HarmonyOS NEXT Wrapper (Beta)

Content Type: Module
Categories: Mobile

Overview

HarmonyOS NEXT Wrapper (Mobile Capabilities)

This module is based on a native wrapper for PWA. It provided JavaScript actions to access mobile device functionalities. This module enables seamless integration with device hardware features including ambient light sensors, clipboard operations, file system access, printing capabilities, proximity sensors, QR code scanning, content sharing, media capture (photo/video), and vibration control. Enhance your mobile applications with native device capabilities for a superior user experience.

Platform Support

  • HarmonyOS NEXT

Documentation

HarmonyOS NEXT Wrapper

Typical usage scenario

The module is designed for Mendix developers building mobile applications that require access to native device functionalities. This module is particularly useful for:

  • Applications requiring interaction with mobile hardware sensors (ambient light, proximity)
  • Apps needing file management capabilities (selection, sharing, uploading)
  • Mobile solutions that enhance user experience through native features (clipboard, vibration, sharing)
  • Enterprise applications requiring document handling (printing, sharing documents)
  • Applications with media capture requirements (photos, videos)
  • Apps requiring push notifications and local notifications for user engagement
  • Applications needing HMS push integration for Harmony devices
  • Mobile apps requiring app badge management and notification permissions handling

This module bridges the gap between web-based Mendix applications and native device capabilities, enabling a more integrated and seamless user experience.

Features and limitations

Features:

  • Sensor Access: Subscribe to ambient light and proximity sensors
  • Clipboard Management: Copy, paste, and clear clipboard content
  • File Handling: Select files from device storage
  • Printing Capabilities: Print files and web pages
  • Sharing Functions: Share documents and text content
  • Media Capture: Take photos and record videos
  • QR Code: Scan QR codes
  • Haptic Feedback: Control device vibration patterns
  • Push Notifications: HMS Push integration for reliable message delivery on Harmony devices
  • Local Notifications: Send local notifications to users with customizable content
  • Badge Management: Set and manage app icon badge numbers

Limitations:

  • Features availability depends on the hardware capabilities of the device
  • Background execution of certain sensors may impact battery performance

Dependencies

  • Mendix Studio Pro 10.18.0 or higher
  • HarmonyOS NEXT

Installation

  1. Import the "HarmonyOS NEXT Wrapper" module from the Mendix Marketplace
  2. Add the module as a dependency in your Mendix project
  3. Ensure the required permissions are configured in your native app's settings
  4. Synchronize your project and rebuild your  app

Configuration

  • Implementing JavaScript Actions:
    • Drag the desired JavaScript action from the module into your nanoflow
    • Configure the required parameters for each action
    • Connect the action's response to appropriate handling logic
  • Sensor Usage:
    • When using sensor subscriptions (Ambient Light, Proximity), always implement the corresponding unsubscribe actions when the feature is no longer needed to prevent battery drain

Known bugs

Releases

Version: 0.1.1
Framework Version: 10.24.0
Release Notes: New Features - HMS Push: Added HMS Push notification support - Local Notification: Implemented local notification functionality - Set Badge Number: Added app icon badge number management - Multi-file Sharing: Enhanced sharing capabilities to support multiple files simultaneously - Multi-file Printing: Added batch printing functionality for multiple documents - Get OS Type: Added functionality to retrieve operating system type information
Version: 0.1.0
Framework Version: 10.18.0
Release Notes: HarmonyOS NEXT Wrapper * Version 0.1.0 We are pleased to announce the release of the HarmonyOS NEXT Wrapper module, That is based on a native wrapper for PWA and provided a collection of JavaScript actions that enable seamless access to native mobile device functionalities within your Mendix applications. * Module Overview This module is designed to bridge the gap between Mendix applications and native mobile device features, allowing developers to leverage device capabilities with simple JavaScript actions. This module enhances the user experience by providing access to hardware and system functionalities typically only available in native applications. * Key Features The module includes the following capability groups: 1. AmbientLight Subscribe and unsubscribe to ambient light sensor data 2. Clipboard Copy text to clipboard Paste from clipboard Clear clipboard content 3. FileSystem Select files from device storage 4. Print Print files Print web pages 5. Proximity Subscribe and unsubscribe to proximity sensor events 6. QRCode QR code scanning capabilities 7. Share Share file documents Share text content 8. Upload Take photos using device camera Record videos Upload files from device Camera type selection 9. Vibration Start device vibration Stop device vibration Configure vibration usage types * Implementation Each JavaScript action is thoroughly documented and ready to use in your Mendix projects. Simply import the module and call the appropriate actions where needed in your application. * Requirements Mendix Studio Pro 10.18.0 or higher HarmonyOS NEXT Mobile application with proper permissions configured * Getting Started After importing the module, refer to the included documentation for usage examples and parameter descriptions for each JavaScript action.