简体   繁体   English

从手表向手机Android Wear传输数据的最快方法是什么

[英]What is the fastest way to transfer data from watch to phone Android wear

I am trying to move a slider on a phone to reflect to a slider on the watch. 我正在尝试移动手机上的滑块以反映到手表上的滑块。 It is working but the problem is that if I move the slider up and down fast there is a long delay so that my changes take a second or so for the reflection to catch up. 它可以正常工作,但问题是,如果我快速上下移动滑块,则会有很长的延迟,因此我的更改需要一秒钟左右的时间才能反映出来。 I'm using a PutDataMapRequest to communicate through GoogleApiClient. 我正在使用PutDataMapRequest通过GoogleApiClient进行通信。 I guess my real question is there a way to do this faster. 我想我的真正问题是有一种方法可以更快地做到这一点。 I'm just wanting to send an int and a String. 我只是想发送一个整数和一个字符串。

Are you using DataApi? 您正在使用DataApi吗? If so, use MessageApi and send a message via sendMessage(); 如果是这样,请使用MessageApi并通过sendMessage()发送一条消息。 that would be faster. 那会更快。 In addition, you may want to optimize how much data you want to set; 另外,您可能需要优化要设置的数据量; for example, it may be enough to send the "progress" when the seekbar is stopped and not changing any more; 例如,当搜索栏停止并且不再更改时,发送“进度”就足够了; that means no data needs to be sent while it is moving. 这意味着在移动时无需发送任何数据。 If that is too little, you may decide to do a bit of rate control before sending data; 如果太少,您可以决定在发送数据之前先进行一些速率控制。 for example if your seekbar can change between 0 to 100, you most likely don't need to send a message with every change, you can say, for example, send a message when seekbar changes by 3 units and when the seekbar stops changing, send the final value to remain accurate at the end of the process. 例如,如果您的搜索栏可以在0到100之间变化,那么您很有可能不需要每次更改都发送一条消息,例如您可以说,当搜索栏每变化3个单位并且搜索栏停止变化时发送一条消息,发送最终值以在过程结束时保持准确。

暂无
暂无

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

相关问题 通过蓝牙将数据从Andread Wear Watch传输到手机 - Data Transfer from Andread Wear Watch to phone via bluetooth 如果我只想将文本字符串(安全数据)从android手机发送到android wear(手表),该怎么办? - If I want to send just text string(secure data) from android phone to android wear(watch), what should I do for that? Android手机上安装第三方应用程序是否有办法破解Android手机和Android Wear手表之间的数据? - Is there any way for 3rd party apps installed on Android phone to hack data between Android phone and Android Wear watch? 来自Android Wear手表的通用Android手机音乐控件 - General purpose Android phone music controls from Android Wear watch 将HashMap数据从移动设备传输到Android Wear - Transfer HashMap Data From Mobile to Android Wear 手表未收到手表发送的Android Wear消息 - Android Wear message sent from watch is not received by the phone devie Android Wear(手表)。 有没有办法检测磨损是否与任何设备相连,仅仅是磨损? - Android Wear(Watch). Is there any way to detect that wear is connected to any device or not, from the wear only? 在 Android Wear OS(即 CSV)上保存和传输智能手表传感器数据的最佳方式是什么? - What is the best way to save and transfer smartwatch sensor data on Android Wear OS (i.e. as CSV)? 检测Android Wear设备是否已连接到手机的最简单方法是什么? - What is the easiest way to detect if an Android Wear device is connected to the phone? Android Wear:将变量从数据对象传递到表盘服务 - Android Wear: Passing variable from data object into watch face service
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM