polarofficial / polar-ble-sdk

Repository includes SDK and code examples. More info https://polar.com/en/developers
Other
447 stars 147 forks source link

responseError(errorCode: 202) when trying to listOfflineRecordings with Polar OH1 #442

Closed maximilian-V closed 4 months ago

maximilian-V commented 4 months ago

Platform your question concerns:

Device:

Description:

Hello,

I am currently trying to use listOfflineRecordings in an Expo Module:

AsyncFunction("getOfflineEntries") { (deviceId: String, promise: Promise) in polarBleSdkManager.api.listOfflineRecordings(deviceId) .observe(on: MainScheduler.instance) .subscribe{ e in switch e { case .next(let entry): self.offlineEntries.append(entry) case .error(let err): promise.resolve("Offline recording listing error: \(err)") case .completed: promise.resolve(self.offlineEntries) } }.disposed(by: disposeBag) } Unfortunately I am getting the following error from my promise in the case .completed: responseError(errorCode: 202)

Does someone know how I can fix this?

jimmyzumthurm commented 4 months ago

Hello @maximilian-V , Unfortunately OH1 doesn't support the offline recording feature, only Verity Sense does currently. There is no plan to update OH1 to provide that functionality. The main reason is that internal memory of the device is very small and will get full very fast when recording sensor raw data.

maximilian-V commented 4 months ago

Hello @jimmyzumthurm,

thanks for the quick response!

Does this mean I can only use the internal memory with the official polar applications such as Polar Beat?

jimmyzumthurm commented 4 months ago

@maximilian-V It seems the API you want to use here is listExercisesand not listOfflineRecordings. You should be able to sync training sessions like Beat or Flow does using that.

maximilian-V commented 4 months ago

@jimmyzumthurm would this work with the OH1 device? In the documentation i can only find the method func fetchStoredExerciseList(_ identifier: String) -> Observable<[PolarExerciseEntry]> that is described to only work with the H10 device. Not finding a method called listExercises.