Skip to Content
On this page

Native BLE

Use @onekeyfe/hd-common-connect-sdk in a native mobile context to forward hardware transport calls over BLE. The SDK runs JavaScript in a WebView or JS engine while native Bluetooth communication happens in the host app.

When to choose native BLE

  • You control the entire native app experience (Android, iOS, Flutter) and can host a WebView or JS runtime that forwards send/receive over BLE.
  • You need fine-grained access to OS-level BLE permissions, pairing workflows, or custom UI that is easier to build in Swift/Kotlin or Flutter than in React Native.
  • You want to reuse the @onekeyfe/hd-common-connect-sdk JavaScript API while keeping the native BLE stack in-house.

Platform guides

PlatformHighlightsGuide
AndroidNordic BLE bridge, pairing, permissions, and JS bridge wiringAndroid (Native)
iOSCoreBluetooth setup, pairing helpers, and JS event plumbingiOS (Native)
FlutterFlutter plugin wiring + native host bridge examplesFlutter (Native)

Need a cross-platform React Native experience? Use the React Native BLE guide instead.

Core concepts

  • Read Low-Level Transport Plugin & Protocol before wiring native BLE to understand raw BLE notification forwarding and SDK-owned V1/V2 framing.
  • Subscribe early to UI_EVENT so PIN/Passphrase confirmations and prompts do not stall the request queue.
  • Reuse the same HardwareSDK adapter used in the Web guide; the native code simply forwards BLE packets instead of WebUSB.
Last updated on