Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 3.75 KB

File metadata and controls

40 lines (32 loc) · 3.75 KB

Platform differences

The public Bridge method names stay aligned. Unsupported platform behavior remains visible through capabilities and rejects UNSUPPORTED.

Area Android iOS HarmonyOS NEXT
Native stack Kotlin + System WebView Swift + UIKit/SwiftUI + WKWebView ArkTS + ArkUI + ArkWeb
Baseline Android 8.0 / API 26 iOS 15 API 24 phone
Distribution APK/AAB; TOML-defined channels App Store, official HAP; signing supplied in DevEco
Bridge transport AndroidX WebKit reply listener with exact allowed origins WK script-message reply handler with source/top-origin checks ArkWeb async JS proxy plus native runJavaScript response callback
Debug test origin https://webox.test through WebViewAssetLoader https://webox.test through a simulated HTTPS response backed by the app bundle https://webox.test through rawfile interception
Privacy/loading/error UI Native Android views Native UIKit/SwiftUI Native ArkUI
toast / statusBar Supported Supported Supported
haptic / saveImage / share Supported Supported Supported; haptic is false on devices without a vibrator
backToHome / exitApp Supported UNSUPPORTED Supported
File picker Single/multiple and image/video/audio capture System WKWebView picker/capture behavior Single/multiple, image/video capture, and native M4A audio recording
Camera/microphone Runtime permission + WebChromeClient grant AVFoundation + WKUIDelegate decision ArkWeb permission path; emulator hardware limits still apply
HTTP/data/blob downloads Supported Supported System destination picker and bounded streaming; 100 MB per download
External app detection Package queries canOpenURL with fixed schemes bundleManager.canOpenLink with fixed querySchemes
App update APK or configured store App Store lookup/open Configured destination only; no HAP self-install
capabilities.selfUpdate True only for APK-mode channels False False
Fullscreen video Custom view, landscape, immersive bars Native WKWebView fullscreen presentation with explicit recovery ArkWeb fullscreen element, forced landscape, immersive presentation
Process recovery Rebuild after renderer loss Rebuild after WebKit process termination Reload/rebuild through ArkWeb error/lifecycle state

Android detects the three supported application families by their fixed package names. iOS uses its fixed, declared canOpenURL schemes. HarmonyOS declares fixed querySchemes, checks bundleManager.canOpenLink, and launches through UIAbilityContext.openLink; testApps/ohosLinkReceiver provides an emulator-only target for verifying the exact URI handoff.

HarmonyOS policy boundary

HarmonyOS supports:

  • Native privacy, loading, error, and update overlays.
  • Secure local virtual origin and exact-origin Bridge.
  • Every public Bridge method available to the platform, including haptics, image saving, text/file sharing, and update checks.
  • Single/multiple file selection, image/video capture routing, an in-shell audio recorder, camera/microphone permission routing, and fullscreen enter/exit.
  • Authenticated HTTP(S), data:, and blob: downloads through a native destination picker.
  • Weixin, QQ, and Alipay installation detection and gesture-gated navigation.

HarmonyOS deliberately keeps capabilities.selfUpdate=false: a normal application may open its configured AppGallery/store destination but does not silently install its own HAP. A physical HarmonyOS NEXT device pass is still a release requirement for hardware-only behavior such as vibration and camera quality.

The three shells share generated product data, Web assets, and the Bridge contract; they do not share native UI or WebView wrapper code.