Interface PolarBleLowLevelApi

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Maybe<ByteArray> readFile(String identifier, String filePath) Read any file over PFtp BLE client.
      abstract Completable writeFile(String identifier, String filePath, ByteArray fileData) Write any file over PFtp BLE client.
      abstract Completable deleteFileOrDirectory(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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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 address
        filePath - 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 address
        filePath - 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 address
        filePath - 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 address
        recurseDeep - Recursion goes to the bottom of the file tree when true.
        Returns:

        List of files or error