- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在开发一个带有配套移动应用程序的新穿戴应用程序。
很少需要通过蓝牙连接将信息从手机传输到 watch 。
主要的穿戴应用程序是独立的,因此从手机传输数据是一种奢侈,因为它会比在 watch 上更方便地设置用户偏好(虽然设置菜单也会存在于 watch 上)。
所以我在两个选择之间进退两难:
WearableListenerService
它将始终收听来自手机的消息。WearableListenerService
有多贵特别是在系统资源和电池生命周期方面?
最佳答案
根据 WearableListenerService
docs :
The life-cycle of this service is managed by Android Wear. This service will be bound to and events delivered as a result of various Android Wear events, including data, messages and events indicating a device has connected or disconnected from the Android Wear network.
WearableListenerService
正是你应该做的。
关于android - WearableListenerService 有多贵? (穿奥斯),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71178766/
我正在通过我的手持设备从我的 Wear 向服务发送消息。我第一次单击手持设备上的按钮只是调用服务的 onCreate 方法,第二次服务也收到消息。我无法找出问题所在。 这是我的穿戴部分: @O
我已经实现了 WearableListenerService在我的主应用程序和配套的 Wear 应用程序中。在 list 中,该服务需要声明为 android:exported="true"(或者根本
我正在开发一个带有配套移动应用程序的新穿戴应用程序。 很少需要通过蓝牙连接将信息从手机传输到 watch 。 主要的穿戴应用程序是独立的,因此从手机传输数据是一种奢侈,因为它会比在 watch 上更方
最近我的一个支持 Wear OS (Android Wear) 的应用程序出现了一个错误,当可穿戴设备向它发送数据时,移动设备上的服务永远不会使用react。 在排查根本原因时,我注意到从未调用 We
我创建了简单的 PhoneWear 应用程序。 Wear 应用有一个带有代码的 Activity: public class MainActivity extends Activity impleme
我正在开发一个支持 Android Wear 的 Android 应用。 主应用程序将数据发送到 Android 穿戴应用程序 WearableListenerService,然后发出通知并显示。 我
我正在尝试使用 Wearable.MessageApi 从我的 Android Wear 应用向我的手机应用发送一条简单消息。 这是我在 Wear 设备上来自 GoogleApiClient 的 on
我正在使用 Eclipse IDE 开发 Android Wear 应用程序。我对 Wear 应用程序和移动应用程序使用相同的包名称,并且我正在根据 google documentation 手动打包
我按照教程从手机调用可穿戴 Activity ,发布在这里 How to send notification from handheld to wear to open Activity on wea
有没有办法从 wearableListenerService 调用 Activity 的非静态方法?(绑定(bind)服务对于 wearableListenerService 是不可能的。因为方法 o
我知道这个问题已被多次回答,但作为 Android 的新手,我仍然无法理解给出的答案。例如在这个问题中:How to use an Android Handler to update a TextVi
当我读到 Activity 和 Service 之间的通信时,我发现我们可以使用其中之一 IBinder 信使 AIDL 我对前两个感兴趣。因此,当我尝试实现此功能以在 Activity 和 Wear
我正在使用 Service extends WearableListenerService 开发 android wear 项目。当我尝试添加服务绑定(bind)器时,我看到了这个错误 private
我是一名java/android初学者,正在尝试开发一个简单的穿戴应用程序。 我正在使用 WearableListenerService 来监听来自手机的数据更改并将这些数据显示在可穿戴设备上。这
我有一个 Android 应用程序(除其他外)在 Android Wear 设备上显示通知。 这是通过在 Wear 模块中扩展 WearableListenerService 的类来完成的。在 Wea
我正在尝试使用 Wearable 消息 API 在我的手机和可穿戴设备之间发送消息。手机(实体一加一)和智能 watch (实体索尼智能 watch 3)将相互连接。发送消息也会报告已发送。但是移
我正在开发一款适用于 Android Wear 的应用程序,它可以在手机上启动一项 Activity 。一切都很好,但我不想依赖手机上不断运行的后台服务来接收这条消息。理想情况下,我会让 Wearab
Hello? I am developing android wear app.你好我正在开发安卓穿戴应用程序。 I know that there is a limitation of ba
我是一名优秀的程序员,十分优秀!