0

I have created a sample Tizen native Health App for Samsung S3 Gear and installed in Gear device and its working.

How can I get the Data from the Gear to Mobile, What should I do next ?

Below is the sample native app link which I tested. https://developer.tizen.org/ko/community/tip-tech/accessing-heart-rate-monitor-hrm-sensor-data-native-applications?langredirect=1

Umaiki
  • 354
  • 2
  • 14
Ajitsree
  • 37
  • 2
  • 10

2 Answers2

1

You can also send the data directly to the cloud from the Samsung wearable Gear Sport using this code:

function sendData() {
    var xmlHttp = new XMLHttpRequest();

    xmlHttp.onreadystatechange = function() {
        if (xmlHttp.readyState == 4) {
            console.log('done');
            if (xmlHttp.status == 200) {
                alert("data send successfully!");
            } else {
                alert("failed to send data!");
            }
        }
    }

    xmlHttp.open("POST", API_URL);
    xmlHttp.setRequestHeader("Content-Type", "application/json");

    var data = {
        "key" : "foo",
        "value": "bar",
        "timestamp": 123
    };

    xmlHttp.send(JSON.stringify(data));
}

and then you can call sendData() function like this:

window.onload = function() {
    var API_URL = "https://foobar.foo/endpoint"
    sendData();
}
Md. Armaan-Ul-Islam
  • 2,154
  • 2
  • 16
  • 20
tymbark
  • 1,279
  • 12
  • 20
0

I've shared a solution with sample application in this relevant post. Please Check it out for details:

How to integrate Samsung Gear Steps in android Application?

You have to use Accessory SDK. This Sample Above consists of Tizen Web Application, In your case you would need Native. You would find Native Sample/Template on Accessory SDK Package.

Md. Armaan-Ul-Islam
  • 2,154
  • 2
  • 16
  • 20
  • Thanks a lot and really appreciate for your answer. I will try the below Tizen native sample application and let you know. https://developer.tizen.org/ko/community/tip-tech/accessing-heart-rate-monitor-hrm-sensor-data-native-applications?langredirect=1 – Ajitsree Apr 15 '18 at 05:01