HarmonyOS NEXT Wrapper (Beta)
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
- Import the "HarmonyOS NEXT Wrapper" module from the Mendix Marketplace
- Add the module as a dependency in your Mendix project
- Ensure the required permissions are configured in your native app's settings
- 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
- For applications that need to use the paste functionality of clipboard, additional ACL permissions must be requested in advance. It is recommended to use the paste controls natively provided by the Harmony system whenever possible.受限开放权限-应用权限列表-应用权限管控-程序访问控制-安全-系统 - 华为HarmonyOS开发者