Expand my Community achievements bar.

SOLVED

AEM integration with wearable devices

Avatar

Level 4

Hi Friends,

I am getting one of the requirement from the banking and finance customer.

This customer wanted to integrate AEM with wearable devices like Fitbit and Nike+ and also provide the following devices is there any mechanism we can implement in AEM integrating with these devices. If anyone has come across with this implementation please do share the knowledge.

                
Daily Blood Pressure Log
Headache Log
Sleep Log
Fitness Assessment

Since AEM has on premise and cloud installation AEM can be integrated with these wearable devices in both the version.

Regards

Pr@veen

1 Accepted Solution

Avatar

Correct answer by
Administrator

Hi Praveen

There is no Out of Box component/service for this.

But, you can easily implement it by creating a custom component/service that will call the Fitbit rest apis. FitBit API's returns json response that you can manage as per your need.

Example of AEM consuming REST APIs:- https://helpx.adobe.com/experience-manager/using/restful-services.html

//           HttpGet getRequest = new HttpGet("http://maps.googleapis.com/maps/api/distancematrix/json?origins=Vancouver%20BC&destinations=San%20Fr...");
            getRequest.addHeader("accept", "application/json");

FitBit API's:- 

    Documentation:- https://dev.fitbit.com/docs/

    1. Register your application to get API client credentials.

    2. Implement an OAuth 2.0 authorization flow to allow people to give your app permission to access data on their behalf.

    3. Make HTTP requests to access data. The different types of data available via the Web API are listed in the navigation. You can also try the API Explorer.

Example to get data after Authentication is: "GET https://api.fitbit.com/1/user/[user-id]/activities/heart/date/[date]/[period].json"

It would return Json link: 

        {
            "activities-heart": [
                {
                    "dateTime": "2015-08-04",
                    "value": {
                        "customHeartRateZones": [],
                        "heartRateZones": [
                           {
                                "caloriesOut": 740.15264,
                                "max": 94,
                                "min": 30,
                                "minutes": 593,
                                "name": "Out of Range"
                            },
                            {
                                "caloriesOut": 249.66204,
                                "max": 132,
                                "min": 94,
                                "minutes": 46,
                                "name": "Fat Burn"
                            }
                         ],
                        "restingHeartRate": 68
                    }
                }
            ]

I hope this would help you.

~kautuk



Kautuk Sahni

View solution in original post

4 Replies

Avatar

Level 9

Praveen,

What is the use case here? What client would achieve by integrating with These devices?

Avatar

Level 4

Jitendra,

Fitbit is an health monitoring equipment below url for reference customer is looking forward to integrate AEM along with fitbit devices as a dashbord displaying the workouts with calories burnt.

http://www.fitbit.com/in/home 

 

Regards

Avatar

Level 10

Read this - Fitbit supports Rest- -

https://dev.fitbit.com/docs/

You can integrate with AEM using this. 

Avatar

Correct answer by
Administrator

Hi Praveen

There is no Out of Box component/service for this.

But, you can easily implement it by creating a custom component/service that will call the Fitbit rest apis. FitBit API's returns json response that you can manage as per your need.

Example of AEM consuming REST APIs:- https://helpx.adobe.com/experience-manager/using/restful-services.html

//           HttpGet getRequest = new HttpGet("http://maps.googleapis.com/maps/api/distancematrix/json?origins=Vancouver%20BC&destinations=San%20Fr...");
            getRequest.addHeader("accept", "application/json");

FitBit API's:- 

    Documentation:- https://dev.fitbit.com/docs/

    1. Register your application to get API client credentials.

    2. Implement an OAuth 2.0 authorization flow to allow people to give your app permission to access data on their behalf.

    3. Make HTTP requests to access data. The different types of data available via the Web API are listed in the navigation. You can also try the API Explorer.

Example to get data after Authentication is: "GET https://api.fitbit.com/1/user/[user-id]/activities/heart/date/[date]/[period].json"

It would return Json link: 

        {
            "activities-heart": [
                {
                    "dateTime": "2015-08-04",
                    "value": {
                        "customHeartRateZones": [],
                        "heartRateZones": [
                           {
                                "caloriesOut": 740.15264,
                                "max": 94,
                                "min": 30,
                                "minutes": 593,
                                "name": "Out of Range"
                            },
                            {
                                "caloriesOut": 249.66204,
                                "max": 132,
                                "min": 94,
                                "minutes": 46,
                                "name": "Fat Burn"
                            }
                         ],
                        "restingHeartRate": 68
                    }
                }
            ]

I hope this would help you.

~kautuk



Kautuk Sahni