Plaud Android SDK API Reference Documentation.
/**
* @param isStart Start/stop scan
*/
agent.scanBle(boolean isStart)
BleAgentListener {
override fun scanBleDeviceReceiver(device: BleDevice) {
// addDevice
}
}
/**
* @param device Device instance {@link BleDevice}
* @param bindToken Binding token
* @param devToken Device binding code (not required)
* @param userName User name (not required)
* @param connectTimeout Connection timeout duration (must be > 0)
* @param handshakeTimeout Handshake timeout duration (must be > 0)
*/
agent.connectionBLE(BleDevice device, String bindToken, String devToken,
String userName, long connectTimeout, long handshakeTimeout)
/**
* Unpair the device
*
* @param isClearFile Whether to clear device files
* @param onRequest Send callback
* @param onResponse Device return callback
*/
agent.depair(boolean isClearFile, AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<DepairRsp> onResponse);
agent.disconnectBle()
/**
* Get device status
*
* @param onRequest Send callback
* @param onResponse Device return callback
*/
agent.getState(AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<GetStateRsp> onResponse);
/**
* Get battery status
*
* @param onRequest Send callback
* @param onResponse Device return callback
*/
agent.getBattStatus(AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<BattStatusRsp> onResponse);
/**
* Get remaining system capacity
*
* @param onRequest Send callback
* @param onResponse Device return callback
*/
agent.getStorage(AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<StorageRsp> onResponse);
/**
* Start recording
*
* @param scene Scene
* @param onRequest Send callback
* @param onResponse Device return callback
*/
agent.startRecord(int scene, AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<RecordStartRsp> onResponse);
/**
* Pause recording
*
* @param sessionId Session ID
* @param onRequest Send callback
* @param onResponse Device return callback
*/
agent.recordPause(long sessionId, int scene, AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<RecordPauseRsp> onResponse);
/**
* Resume recording
*
* @param sessionId Session ID
* @param scene Scene
* @param onRequest Send callback
* @param onResponse Device return callback
*/
agent.recordResume(long sessionId, int scene, AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<RecordResumeRsp> onResponse);
/**
* Stop recording
*
* @param scene Scene
* @param onRequest Send callback
* @param onResponse Device return callback
*/
agent.stopRecord(int scene, AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<RecordStopRsp> onResponse);
/**
* Get list of recording session files
* @param sessionId Session ID
* @param onRequest Send callback
* @param onResponse Device return callback
*/
agent.getRecSessions(long sessionId, AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<GetRecSessionsRsp> onResponse);
/**
* Download file
* When downloading a single file, two information packets (head & tail) are added
* to mark the start and end of the data packet (package) transmission.
*
* @param sessionId Recording session ID
* @param start Start position
* @param end End position
* @param onRequest Send callback
* @param onHeadResponse Download file head callback {@link AgentCallback.OnResponse <SyncFileHeadRsp>}
* @param onTailResponse Download file tail callback {@link AgentCallback.OnResponse <SyncFileTailRsp>}
* @param voiceDataCreator This parameter cannot be null {@link ISyncVoiceDataKeepOut}
*/
agent.syncFileStart(long sessionId, long start, long end,
AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<SyncFileHeadRsp> onHeadResponse,
AgentCallback.OnResponse<SyncFileTailRsp> onTailResponse,
ISyncVoiceDataKeepOut voiceDataCreator);
/**
* Stop file download
*
* @param onRequest Send callback
* @param onResponse Device return callback
*/
agent.syncFileStop(AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<SyncRecFileStopRsp> onResponse);
/**
* Delete file
*
* @param sessionId File ID
* @param onRequest Send callback
* @param onResponse Device return callback
*/
agent.syncFileDel(long sessionId, AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<SyncRecFileDelRsp> onResponse);
/**
* Clear recording files on the device end
*
* @param onRequest Send callback
* @param onResponse Device return callback
*/
agent.clearRecordFile(AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<ClearRecordFileRsp> onResponse);
/**
* Set idle time sync
*
* @param type On/Off
* @param onRequest Send callback
* @param onResponse Device return callback
*/
agent.setAutoSync(Constants.CommonSwitch type, AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<CommonSettingsRsp> onResponse);
/**
* Get idle time sync
*
* @param onRequest Send callback
* @param onResponse Device return callback
*/
agent.getAutoSync(AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<CommonSettingsRsp> onResponse);
/**
* Get idle time Wi-Fi information
*
* @param onRequest Send callback
* @param onResponse Device return callback
*/
agent.getWifiInfo(int wifiIndex, AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<GetWifiInfoRsp> onResponse);
/**
* Set Wi-Fi information
*
* @param onRequest Send callback
* @param onResponse Device return callback
*/
agent.setSyncWifi(int operation,
String ssid,
String password,
int wifiIndex, AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<SetWifiRsp> onResponse);
/**
* Delete idle time Wi-Fi information
*
* @param onRequest Send callback
* @param onResponse Device return callback
*/
agent.deleteWifiInfo(List<Long> wifiIndexs, AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<DeleteWifiRsp> onResponse);
/**
* Test idle time sync Wi-Fi
*
* @param onRequest Send callback
* @param onResponse Device return callback
*/
agent.testWifiInfo(Long wifiIndex, AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<TestWifiInfoRsp> onResponse);
/**
* Get the result of the idle time sync Wi-Fi test
* Note: The connection will be lost during this process. Manual reconnection is required to get the result.
*
* @param onRequest Send callback
* @param onResponse Device return callback
*/
agent.testWifiResult(Long wifiIndex, AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<TestWifiResultRsp> onResponse);
/**
* Get the idle time sync Wi-Fi list
*
* @param onRequest Send callback
* @param onResponse Device return callback
*/
agent.getWifiList(AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<GetWifiListRsp> onResponse);
agent.setWifiSyncDomain(String url, AgentCallback.OnRequest onRequest,
AgentCallback.OnResponse<CommonStringSetRsp> onResponse,
AgentCallback.OnError onError);
/**
* Transcribe and Summary
*
* @param fileId
* @param workflows A list of workflows that define the processing steps to be applied to the file.
* Each workflow may represent a different set of operations or transformations that are to be performed on the file.
*/
SubmitResponse response = NiceBuildSdk.submit(fileId: String, workflows: List<Workflow>?)