17
Views
4
Comments
Solved
[Health & Fitness Plugin] Fetching Sleep data with AdvancedQuery method not working
Question
health-fitness-plugin
Mobile icon
Forge asset by OutSystems
Application Type
Mobile

Hello,

We're building a POC to test the plugin capabilities and most of the wearables work fine, except when trying to get Sleep information.

We're using the AdvancedQuery client action to fetch the daily Sleep information from the current month (we've also tried changing the date interval to a small one) but we always get the following error: "Failed to get data. Error code: 102. Operation not allowed."

Do you have any idea how to solve this?

Thanks.

UserImage.jpg
Hector Gordin
Solution

Hello Marcelo,

The error you've encountered appears to be related to the operation being used. For the SLEEP variable, the available operations in the OperationType are RAW, AVERAGE, MAX, and MIN.

Could you please confirm that the OperationType set is one of these? If it isn't, could you share the values that you're setting in the client action?

Best regards

Hector Gordin

UserImage.jpg
Hector Gordin

Hello Marcelo,

Is the issue that you are facing  in Android or IOs?

Best Regards

2018-06-05 14-23-24
Marcelo Nunes

Hello Hector,

We tested both in iOS and Android and received the same error.

Best Regards

UserImage.jpg
Hector Gordin
Solution

Hello Marcelo,

The error you've encountered appears to be related to the operation being used. For the SLEEP variable, the available operations in the OperationType are RAW, AVERAGE, MAX, and MIN.

Could you please confirm that the OperationType set is one of these? If it isn't, could you share the values that you're setting in the client action?

Best regards

Hector Gordin

2018-06-05 14-23-24
Marcelo Nunes

Hi Hector,

You are right. I was using the SUM method, trying to get the sum of all minutes of sleep for the previous days.

I changed it to RAW and it now works.

Will need to work with this raw data to try and display something more informative, but it is a start.

Best,

Marcelo Nunes

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.