HarmonyOS NEXT Wrapper (Beta)
Overview
HarmonyOS NEXT Development Suite
Enable your Mendix applications to support HarmonyOS NEXT systems through this comprehensive development suite. This package contains two core modules that work together to provide complete native mobile capabilities and seamless application deployment.
Module 1: 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.
Module2: HarmonyOS NEXT App Builder
Build and deploy your Mendix apps natively on HarmonyOS NEXT with just a few clicks! This Mendix extension enables developers to compile and package Mendix applications specifically for HarmonyOS NEXT. Seamlessly extend your app's reach to Huawei devices running Harmony OS Next.
What This Extension Does?
The HarmonyOS NEXT App Builder is an extension that provides a streamlined workflow to:
- Package your Mendix applications for HarmonyOS NEXT compatibility
- Manage permissions and app configurations
- Handle signing certificates and profiles
- Deploy directly to connected Harmony devices
Platform Support
- HarmonyOS NEXT
- Mendix Studio Pro 10.24.0 or Higher
- AppGallery developer account
- HarmonyOS NEXT device for testing (optional but recommended)
Documentation
HarmonyOS NEXT Development Suite
This development suite contains two collaborative modules:
📱 HarmonyOS NEXT Wrapper
Provides native device functionality access
- Hardware integration: sensors, Bluetooth, NFC, Deeplink
- File management, media capture, QR code scanning
- User interaction features: clipboard, vibration, sharing
- HMS Push integration and local notification management
🔧 HarmonyOS NEXT App Builder
Provides app compilation and deployment capabilities
- One-click compilation of Mendix apps to HarmonyOS NEXT native format
- Certificate and permission management interface
- Direct device deployment and app publishing
Installation Requirements
- Dependencies: Mendix Studio Pro 10.24.0 or higher
- Platform Support: HarmonyOS NEXT
- Developer Account: Huawei AppGallery Connect access required
After installing the suite, you will see two modules in your project. Please refer to their respective documentation below.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
HarmonyOS NEXT Wrapper
📦 This module is part of the HarmonyOS NEXT Development Suite
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
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开发者
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
HarmonyOS NEXT App Builder
📦 This module is part of the HarmonyOS NEXT Development Suite
Typical Usage Scenario
The HarmonyOS NEXT App Builder extension enables Mendix developers to compile and deploy their applications directly to HarmonyOS NEXT-powered devices. This extension is particularly valuable for:
- Organizations looking to expand their application reach to HarmonyOS NEXT device users
- Teams wanting to leverage Mendix's low-code capabilities while accessing the growing HarmonyOS NEXT ecosystem
- Projects requiring native HarmonyOS NEXT capabilities not available through web applications
Features and Limitations
Features
- One-click compilation of Mendix applications to HarmonyOS NEXT native format
- Comprehensive permission management through user-friendly interface
- Built-in certificate and signing management tools
- Direct deployment to connected HarmonyOS NEXT devices
- Support for both development and production environments
- User-friendly GUI for configuration management
Limitations
- Requires separate AppGallery developer account and approval process
- Updates to the HarmonyOS NEXT platform may occasionally require extension update
Installation
- Open Mendix Studio Pro
- Navigate to Marketplace (accessible from the top menu)
- Search for "HarmonyOS NEXT App Builder"
- Click "Download" and follow the installation prompts
Configuration
Initial Setup
- Register for a Huawei developer account at developer.huawei.com if you don't have one
- Log in to AppGallery Connect and create a new application
- Note your App ID and package name for later use
App Configuration
- Add the extension startup parameters in the properties of Studio Pro (“...studiopro.exe" --enable-extension-development)
- Open your Mendix project in Studio Pro
- Access the HarmonyOS NEXT Builder from extentions menu
- Fill in the App Info section with details matching your AppGallery application:
- App Name
- Package Name (must match the one registered in AppGallery)
- Version Code
- PWA APP URL
- Select required permissions for your application (camera, location, storage, etc.)
Signing Configuration
- Create a signature in the Signing step (e.g., "debug" for development or "release" for production)
- Go to AppGallery Connect and create a certificate
- Create a Profile in AppGallery Connect
- Download both certificate and Profile files
- Place these files in your project's configuration directory
- Rename them to match your signature name (e.g., "debug")
- Refresh signature
Building and Deployment
- Click "Generate Package" to create the installation file
- Connect your HarmonyOS NEXT device to your computer via USB (ensure developer mode is enabled on the device)
- Select your connected device from the list
- Click "Install" to deploy directly to the device