Installation
Add the Plaud SDK to your Android project by including the following steps:1
Add the ARR file
Add the provided plaud-sdk.aar file under
{your_project}/app/libs/
2
Add dependency and plugin
Add dependencies and plugins in your app-level
build.gradle
file:build.gradle.kts
Requirements
- Supported Versions: The SDK requires a minimum of Android 5.0 (API 21) and is built against Android 14 (API 34).
- Internet: Required for making API calls to Plaud Cloud.
- Bluetooth: Essential for device scanning, connection, and communication.
- Network Security: Configuration must allow secure HTTPS traffic for all API communication.
Setup
Manifest Configuration
Add the following permissions to yourAndroidManifest.xml
:
Runtime Permissions
For Android 12 (API level 31) and higher, Bluetooth permissions have changed, requiring runtime requests forBLUETOOTH_SCAN
and BLUETOOTH_CONNECT
. The following helper class demonstrates how to handle permissions for both newer and older Android versions:
Network Security Configuration
For apps targeting Android 9 (API level 28) or higher, ensure your network security configuration allows clear text traffic if needed:Start Development
Prerequisites
- Android Studio: Arctic Fox or newer recommended
- Kotlin: 1.6.21 or newer
- Java: 8 or newer
- Gradle: 7.3.1 or newer
Initialization
Initialize the Plaud SDK in your Application class or main activity:Callbacks Overview
The most common use for these callbacks is to trigger UI updates based on host app’s user experience.
- scanBleDeviceReceiver - Called when discovered BLE devices are received during scanning.
- btStatusChange - Called when Bluetooth connection status changes(
BluetoothStatus.CONNECTED
,BluetoothStatus.CONNECTED
). - bleConnectFail - Called when Bluetooth connection fails. This is userful for implementing retry logic for higher stability.
- handshakeWaitSure - Called when device pair handshake needs to be confirmed by users.
- deviceOpRecordStart - Called when device starts recording. This event can be used to update custom UI.
- deviceOpRecordStop - Called when device stops recording. This event can be used to update custom UI.
- batteryLevelUpdate - Called when battery level changes.
- rssiChange - Called when signal strength changes.
- mtuChange - Called when MTU size negotiation.
- chargingStatusChange - Called when charging status changes.
- deviceStatusRsp - Called when device status reponses.
- scanFail - Called when Bluetooth scan fails.
Methods
Device Scanning
Connect Device
Start Recording
Stop Recording
A method to manually end the current recording.Example implementation
An example Android app using this SDK can be found here
- Device scan/connect/disconnect
- Recording control(start/stop/pause/resume)
- Recording File Management(Upload/Download)
- Device Wi-Fi Setting/Test
- Transcription and Summary