1 Star 0 Fork 0

KentLee / garmin-app-data-collector

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Garmin app data collector

This project is used to receive the tri-axes accelerometer data from my garmin app. Garmin app 三轴加速度数据接收服务端代码。

Usage

Embed the code below somewhere you want to upload your data. Garmin app中嵌入这段代码并在需要使用的地方进行调用。

function uploadAccel() {
    System.println("Executing upload Web Request");
    var params = {"x"=>mX,"y"=>mY,"z"=>mZ,"p"=>getProfileInfo()};
    var options = {
        :method => Communications.HTTP_REQUEST_METHOD_POST,
        :responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON,
        :headers => {
            "Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON
        }
    };

    Communications.makeWebRequest(
        "http://x.x.x.x/upload",
        params,
        options,
        method(:onReceive)
    );
}

// Receive the data from the web request
function onReceive(responseCode, data) {
    if (responseCode == 200) {
        System.println("data:"+data);
        Attention.playTone(Attention.TONE_SUCCESS);
    } else {
        Attention.playTone(Attention.TONE_FAILURE);
    }
}

空文件

简介

暂无描述 展开 收起
Java 等 2 种语言
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/kent-gitee-io/garmin-app-data-collector.git
git@gitee.com:kent-gitee-io/garmin-app-data-collector.git
kent-gitee-io
garmin-app-data-collector
garmin-app-data-collector
main

搜索帮助