Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message #30

Open
shuanme opened this issue May 28, 2019 · 4 comments
Open

Error message #30

shuanme opened this issue May 28, 2019 · 4 comments

Comments

@shuanme
Copy link

shuanme commented May 28, 2019

想請問 我在doSyncFitnessData 的SyncCallback的onFailure回傳的errorcode是29,這代表甚麼意思?

@rik296
Copy link

rik296 commented May 28, 2019

Hi,
error code = 029 是 Write Command to Device Timeout,是指 app 端發給手環端的藍牙指令 timeout 了,timeout 原因很多,有可能是兩者距離過遠、環境藍牙訊號干擾、或是未完成 doSyncFitnessData() 之前又執行了不同的 API function,以上給您參考

@shuanme
Copy link
Author

shuanme commented May 28, 2019

那想請問一下,我目前是每10秒呼叫一次doSyncFitnessData取得手環資料,可是我今日多加getDeviceBatteryValue 來頻繁更新手環電量資訊,應該寫在哪裡比較恰當?

@rik296
Copy link

rik296 commented May 28, 2019

建議您將欲執行的下一個 API function 寫在 completion callback 中,在此例中,您可以參考以下範例:

_goFITSdk.doSyncFitnessData(new GoFITSdk.SyncCallback() {
                    @Override
                    public void onCompletion() {
                        // 執行下一個 API function
                        _goFITSdk.getDeviceBatteryValue()
                        ...
                    }

                    @Override
                    public void onProgress(String message, int progress) {
                        ...
                    }

                    @Override
                    public void onFailure(int errorCode, String errorMsg) {
                        ...
                    }

                    @Override
                    public void onGetFitnessData(ArrayList<TableStepRecord> stepRecords, ArrayList<TableSleepRecord> sleepRecords, ArrayList<TablePulseRecord> hrRecords, ArrayList<TableSpO2Record> spo2Records) {
                        ...
                    }
                });

@Hayes42
Copy link

Hayes42 commented May 29, 2019

想請問 我在doSyncFitnessData 的SyncCallback的onFailure回傳的errorcode是29,這代表甚麼意思?

@shuanme 想請教您的電話聯絡方式,讓我們更近一步為您服務!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants