【发布时间】:2015-01-08 16:49:50
【问题描述】:
我在使用NotificationCompat 构建的应用上运行了一些通知
根据类型,它们显示背景位图或文本列表,其中大多数使用代码有 1 或 2 个操作:
builder.addAction(R.drawable.ic_notification, text, pendingIntent)
其中一些操作对手表有意义(例如:“喜欢”或“回复”),而有些则没有(例如:“查看相册”)。
我以为我可以使用setLocalOnly(boolean) 方法,但我发现它适用于整个通知,而不仅仅是单个操作。
我也一直在检查 NotificationCompat.Action 和 NotificationCompat.Action.WearableExtender,但找不到任何相关的内容。
那么问题来了:
有没有办法让通知显示在手表上,但只有一些动作而不是其他动作?
【问题讨论】:
标签: android android-notifications wear-os android-wear-notification