Interface PolarBleLowLevelApi
-
- All Implemented Interfaces:
public interface PolarBleLowLevelApi
-
-
Method Summary
Modifier and Type Method Description abstract Maybe<ByteArray>readFile(String identifier, String filePath)Read any file over PFtp BLE client. abstract CompletablewriteFile(String identifier, String filePath, ByteArray fileData)Write any file over PFtp BLE client. abstract CompletabledeleteFileOrDirectory(String identifier, String filePath)Delete any file or directory over PFtp BLE client. abstract Single<List<String>>getFileList(String identifier, String filePath, Boolean recurseDeep)List all files in the given path -
-
Method Detail
-
readFile
abstract Maybe<ByteArray> readFile(String identifier, String filePath)
Read any file over PFtp BLE client. API user must know the exact path to the desired file. API user must also take care of parsing the returned ByteArray payload to the desired data object. NOTE: this is an experimental API intended for Polar internal use only. Polar will not support 3rd party users with this API.
- Parameters:
identifier- Polar device ID or BT addressfilePath- Path to the desired file in a Polar device.- Returns:
Maybe (ByteArray or empty)
-
writeFile
abstract Completable writeFile(String identifier, String filePath, ByteArray fileData)
Write any file over PFtp BLE client. API user must know the exact path to the desired file. API user must also take care of parsing the returned ByteArray payload to the desired data object. NOTE: this is an experimental API intended for Polar internal use only. Polar will not support 3rd party users with this API.
- Parameters:
identifier- Polar device ID or BT addressfilePath- Path to the directory in device in a Polar device.fileData- , file data in already serialized into ByteArray format.- Returns:
Completable or error
-
deleteFileOrDirectory
abstract Completable deleteFileOrDirectory(String identifier, String filePath)
Delete any file or directory over PFtp BLE client. API user must know the exact path to the desired file. API user must also take care of parsing the returned ByteArray payload to the desired data object. NOTE: this is an experimental API intended for Polar internal use only. Polar will not support 3rd party users with this API.
- Parameters:
identifier- Polar device ID or BT addressfilePath- Path of the file or directory to be deleted at a Polar device.- Returns:
Completable or error
-
getFileList
abstract Single<List<String>> getFileList(String identifier, String filePath, Boolean recurseDeep)
List all files in the given path
- Parameters:
identifier- Polar device ID or BT addressrecurseDeep- Recursion goes to the bottom of the file tree when true.- Returns:
List of files or error
-
-
-
-