简体   繁体   English

如何在 android 应用程序中集成 Samsung Gear Steps?

[英]How to integrate Samsung Gear Steps in android Application?

I want to integrate Samsung Gear device for steps in my application, also jawbone Steps and misfit Steps.我想在我的应用程序中集成 Samsung Gear 设备的步骤,还有 jawbone Steps 和 misfit Steps。 I've looked at several things, like the Samsung Gear Site , but found nothing that works for me.我查看了好几样东西,比如Samsung Gear Site ,但没有找到适合我的东西。

For connection and data transfer between mobile android device and Samsung Gear device , Accessory Protocol is defined. 对于移动Android设备和Samsung Gear设备之间的连接和数据传输,定义了附件协议 So, the option available here is using Accessory SDK for Android mobile and Tizen wearable. 因此,此处提供的选项是使用Accessory SDK for Android mobile和Tizen wearable。

Tizen provides HumanActivityMonitor for 3rd party developers to retrieve Pedometer step count data. Tizen为第三方开发人员提供HumanActivityMonitor ,以检索计步器步数数据。

I have developed a sample app in Tizen platform for reading pedometer step count data in gear and send the data to Consumer Android mobile app while the mobile and wearable is connected through Samsung Gear Manager . 在Tizen平台开发了一个示例应用程序,用于读取计步器中的计步器步数数据,并将数据发送到Consumer Android移动应用程序,同时移动和可穿戴设备通过Samsung Gear Manager连接。 Its just a customization over the sample apps available on the sites reffered. 它只是对所提供的网站上提供的示例应用程序的自定义。

I am sharing the code of the tizen web app along with the installer (.wgt) file. 我正在分享tizen Web应用程序代码以及安装程序 (.wgt)文件。 If you are not interested in tizen development right now, you may install the app directly to the Samsung gear using the wgt file. 如果您现在对tizen开发不感兴趣,可以使用wgt文件将应用程序直接安装到Samsung设备上。

I am also sharing the code of the android app along with the installer (.apk) file. 我还与安装程序 (.apk)文件共享Android应用程序代码 You may try a sample transmission between the devices and do your code on android platform as necessary. 您可以尝试在设备之间进行示例传输,并根据需要在Android平台上执行代码。 I have tested the apps on my devices and they are working good, though some data inconsistency occurs. 我已经在我的设备上测试了应用程序并且它们运行良好,但是会出现一些数据不一致的情况。

Zip file link: Zip文件链接:

Android consumer app (apk) Android消费者应用(apk)

Android consumer app (code) Android消费者应用(代码)

Tizen provider app (wgt) Tizen提供商应用程序(wgt)

Tizen provider app (code) Tizen提供商应用程序(代码)

https://drive.google.com/file/d/0B6KEP_6UcxrATllCWTlmeUh1M28/view?usp=sharing https://drive.google.com/file/d/0B6KEP_6UcxrATllCWTlmeUh1M28/view?usp=sharing

在此输入图像描述 在此输入图像描述

在此输入图像描述 在此输入图像描述

Human activity monitor API 人类活动监控API

Human Activity Monitor Guide 人类活动监测指南

Accessory SDK 附件SDK

Please read the Accessory guide and HumanActivityMonitor guide for details implementation, you would find simple explanation there. 有关详细信息,请阅读附件指南和HumanActivityMonitor指南,您可以在那里找到简单的解释。

I have not done this myself, but it seems that Samsung uses it's own OS: Tizen. 我自己没有这样做,但似乎三星使用它自己的操作系统:Tizen。 And that works on / with HTML 5 / CSS / Javascript. 这适用于/使用HTML 5 / CSS / Javascript。

This seems to be the way to get it working. 这似乎是让它运作的方式 And there is this one . 还有这一个

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM