Device Connection

Start/Stop Scan

/**
 * @param isStart Start/stop scan
 */
agent.scanBle(boolean isStart)

Get Scanned Devices

BleAgentListener {
    override fun scanBleDeviceReceiver(device: BleDevice) {
        // addDevice
    }
}

Start Connection

/**
 * @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

/**
 * 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);

Disconnect

agent.disconnectBle()

Device Information

Get Device Status

/**
 * Get device status
 *
 * @param onRequest Send callback
 * @param onResponse Device return callback
 */
agent.getState(AgentCallback.OnRequest onRequest,
           AgentCallback.OnResponse<GetStateRsp> onResponse);

Get Battery Status

/**
 * Get battery status
 *
 * @param onRequest Send callback
 * @param onResponse Device return callback
 */
agent.getBattStatus(AgentCallback.OnRequest onRequest, 
            AgentCallback.OnResponse<BattStatusRsp> onResponse);

Get Storage Capacity

/**
 * Get remaining system capacity
 *
 * @param onRequest Send callback
 * @param onResponse Device return callback
 */
agent.getStorage(AgentCallback.OnRequest onRequest,
           AgentCallback.OnResponse<StorageRsp> onResponse);

Recording Control

Start Recording

/**
 * 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

/**
 * 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

/**
 * 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

/**
 * 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);

Export Recording

Get File List

/**
 * 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

/**
 * 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 Download

/**
 * Stop file download
 *
 * @param onRequest Send callback
 * @param onResponse Device return callback
 */
agent.syncFileStop(AgentCallback.OnRequest onRequest,
        AgentCallback.OnResponse<SyncRecFileStopRsp> onResponse);

Delete File

/**
 * 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 Files

/**
 * 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);

Device Wi-Fi Sync

Set Wi-Fi Auto-Sync Switch

/**
 * 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 Wi-Fi Auto-Sync Switch

/**
 * Get idle time sync
 *
 * @param onRequest Send callback
 * @param onResponse Device return callback
 */
agent.getAutoSync(AgentCallback.OnRequest onRequest,
         AgentCallback.OnResponse<CommonSettingsRsp> onResponse);

Get Wi-Fi Information

/**
 * 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

/**
 * 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 Wi-Fi Information

/**
 * 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 Wi-Fi Network

/**
 * 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 Wi-Fi Network Test Result

/**
 * 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 Wi-Fi List

/**
 * 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);

Set Wi-Fi Upload Domain

agent.setWifiSyncDomain(String url, AgentCallback.OnRequest onRequest,
        AgentCallback.OnResponse<CommonStringSetRsp> onResponse,
        AgentCallback.OnError onError);

AI Cloud Workflow

Transcribe and Summary

/**
 * 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>?)