有什么方法可以防止在 Android Wear 设备上显示通知?我知道使用 setOngoing(true)
是可能的,但我不希望我的通知持续进行。
最佳答案
您应该在 NotificationCompat.Builder
上调用 setLocalOnly(true)
。
来自文档
Set whether or not this notification should not bridge to other devices.
您可以阅读更多here
关于android - 仅在手机上显示通知(不在 Android Wear 上),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34657788/