Bluetooth

Bluetooth is permission-sensitive hardware integration. The app should describe the service it needs and let the host map that request to Classic Bluetooth, Bluetooth Low Energy, nearby-device permissions, pairing, and platform scan rules.
This reference is for the exact API shape. If you are wiring the feature into an app for the first time, start with the Bluetooth guide, then return here when you need operation names, request types, provider contracts, or platform configuration details.

Public API

Item
Value
Effect helper or entrypoint
ctx.effects.bluetooth()
Provider trait or host contract
BluetoothHost
Test provider or test entrypoint
MemoryBluetoothHost
Primary request types
BluetoothScanRequest / BluetoothConnectRequest / BluetoothReadRequest / BluetoothWriteRequest
Primary success types
BluetoothAvailability / BluetoothScanResult / BluetoothConnection
Error type
BluetoothError
CLI value
bluetooth

Operations

Method or operation
Purpose
Request
Success
availability
Read adapter, permission, and Classic/Low Energy support.
()
BluetoothAvailability
request_permission
Request nearby-device/Bluetooth permission.
BluetoothPermissionRequest
BluetoothPermission
scan_devices
Scan for devices matching service filters.
BluetoothScanRequest
BluetoothScanResult
connect_device
Connect to a discovered or remembered device.
BluetoothConnectRequest
BluetoothConnection
disconnect_device
Disconnect an active connection.
BluetoothDisconnectRequest
()
read_characteristic
Read bytes from one characteristic.
BluetoothReadRequest
BluetoothReadResult
write_characteristic
Write bytes to one characteristic.
BluetoothWriteRequest
()
start_advertising
Start host advertising where permitted.
BluetoothAdvertiseRequest
BluetoothAdvertiseReceipt
stop_advertising
Stop a prior advertisement.
BluetoothStopAdvertiseRequest
()

Provider contract

Register a BluetoothHost with .with_bluetooth_host(...). Use MemoryBluetoothHost in tests. Providers should model scan, connect, read, write, advertise, and disconnect separately because each operation can be supported differently.
Providers should return typed errors for unsupported operations, denied permissions, unavailable hardware, cancellation, timeouts, and platform policy restrictions. Silent success is not acceptable because reducers need a truthful result to update state and explain what happened.

Platform configuration

The CLI adds Android legacy and Android 12+ Bluetooth permissions plus optional feature declarations. iOS receives Bluetooth usage text. Desktop providers map the contract to the platform Bluetooth stack.
When a CLI value exists, fission add-capability <value> --project-dir . records the capability in fission.toml and updates generated target files where Fission can do that deterministically. Android generated configuration lives in platforms/android/AndroidManifest.xml. iOS generated configuration lives in platforms/ios/Info.plist and platforms/ios/Entitlements.plist when entitlements are required. Desktop package metadata is reviewed during packaging because Windows, macOS, and Linux use different permission and distribution systems.

Runtime behavior

Capability calls are queued from reducers through ctx.effects. The active shell resolves the request with the registered provider and then dispatches the configured success or error action. Missing providers should produce typed unsupported errors. Packaging mistakes usually show up as denied permissions, missing entitlements, missing route registration, or provider-specific failures.
Fission
A cross-platform, GPU-accelerated user interface framework for Rust. MIT licensed.
Copyright (c) 2026 Fission
Ready to use today. Widget APIs are expected to remain stable; some runtime and shell APIs may change before 1.0.0.
Fission 0.7.0