High-level Facades
The Plaud Embedded Android SDK has two high-level interfaces:- PlaudDeviceAgent: a Kotlin
objectyou call statically - IWifiTransferAgent: the WiFi Fast Transfer session and file operations
- Device Connection: Connecting to & disconnecting from Plaud devices via mobile app
- File Management: Syncing files from Plaud device to mobile app
- Firmware Updates: Updating Plaud device firmware
You can mix the high-level and low-level facades. For example if there’s a behavior that
PlaudDeviceAgent does not include, you can use IBleAgent to cover that functionality.Low-level Facades
The Android SDK has a few lower-level interfaces thatPlaudDeviceAgent wraps over:
- IBleAgent: the BLE protocol library
- NiceBuildSdk: helper SDK for crypto and cloud API calls
- PartnerApiManager: manages the backend endpoints for device signing and RSA keypair generation
IBleAgent Reference
IBleAgent is the raw BLE transport, reached through the protocol library’s TntAgent singleton:
Kotlin
PlaudDeviceAgent doesn’t expose are reachable here.
The callback convention
EveryIBleAgent command takes an OnRequest / OnResponse pair instead of reporting to a global listener.
Kotlin
OnRequest fires when the command is written to the device; OnResponse fires when the device answers. A successful OnRequest with no OnResponse means the device accepted the command but never replied.Device Connection
Kotlin
BleDevice
required
The device to connect to, as delivered by
scanBleDeviceReceiver(...).String
required
Parsed from the user JWT’s
sub claim. NiceBuildSdk.resolveHandshakeToken(...) does this for you — the facade calls it internally.String
required
Per-device token. This is the value
PlaudDeviceAgent.connectBleDevice(bleDevice, deviceToken) forwards; pass "" for the no-token overload.String
required
Owner name written to the device. The facade passes
"" (iOS passes "Plaud").Boolean
required
Clear any existing pairing before connecting. The facade passes
false.Recording & Device State
Kotlin
IBleAgent also exposes the full device-settings surface the facade only partially wraps. Each setting is a get… / set… pair.
Device settings available only on IBleAgent
Device settings available only on IBleAgent
Kotlin
File Sync
Kotlin
Long
required
The session ID to start listing from.
0 lists everything.Long
required
The recording to sync or delete.
Long
required
Start byte offset. Use
0 for the whole file, or resume from a prior offset.Long
required
End byte offset.
0 transfers to the end of the file.ISyncVoiceDataKeepOut
required
Receives streamed audio bytes. Build one with
VoiceDataCreatorFactory.newOriginalData() to write raw device bytes to a file. PlaudDeviceAgent handles this.PlaudDeviceAgent.exportAudio(...) handles this conversion and decryption.
Firmware Push
Kotlin
FirmwareUpdateManager composes the full flow on top of this from querying the version to MD5 verification, CRC, and the post-restart reconnect.
Android’s firmware version check queries
GET /api/sdk/latest-version with an Authorization header, while iOS uses the partner endpoint with X-Device-Signature.BleAgentListener
IBleAgent’s listener is registered on TntAgent:
Kotlin
Events available only on
BleAgentListener:
PartnerApiManager
PartnerApiManager wraps the partner authentication endpoints. Like IBleAgent, reach it via the lower facade:
Kotlin
Kotlin
Device Security
Partner endpoints for device authentication:1
Wait for the RSA key pair — gen-key
initSDK(...) fetches the key pair asynchronously. Poll isPartnerDataReady() before connecting.Kotlin
Kotlin
2
Sign the device SN — sn-sign
3
Connect
Kotlin
Kotlin
NiceBuildSdk.bindDevice(...) / unbindDevice(...) are not the cloud bind documented in the Android SDK reference. They post to a different service (/api/devices/bind) with a different credential. For the documented flow, call developer/api/open/partner/sdk/bind directly with the user token.