Show ongoing notifications in Android Wear

d3m*_*h3r 16 android android-notifications wear-os

I've been playing around with Android Wear and making some dummy apps. What I've noticed is that Android Wear doesn't seem to show the notifications that are ongoing,i.e., notifications with setOngoing(true). Any way to show these notifications on Wear???

car*_*hwa 13

barkside的回答是正确的.我最近写了一篇文章详细介绍了步骤,但基本上:

  1. 使用实现WearableListenerService的服务创建可穿戴应用程序.
  2. 使用Data API从掌上电脑应用程序发送数据项.
  3. 在可穿戴应用程序的服务中,处理接收数据项并在收到后建立持续通知.

这里有一个示例应用程序:https: //github.com/doubleencore/WearOngoingNotificationSample

此处提供了分步说明:http: //www.doubleencore.com/2014/07/create-custom-ongoing-notification-android-wear/


bar*_*ide 6

正在进行的通知不会显示在可穿戴设备上.相反,你必须在可穿戴设备和显示卡上实施Wear App.