【问题标题】:Samsung Gear Live not vibrating on notificationSamsung Gear Live 在通知时不振动
【发布时间】:2014-10-14 09:42:47
【问题描述】:

我为手表制作了一个应用程序,当我点击按钮时它会振动。这很好用。 但是当我尝试创建一个应该在出现时振动的通知时,通知会出现,但没有振动。

我的手表是Samsung Gear Live

我用来生成通知的代码如下(在手表上)

    NotificationManagerCompat notificationManager = NotificationManagerCompat.from(getApplicationContext());
    NotificationCompat.Builder notificationBuilder =
            new NotificationCompat.Builder(this)
                    .setSmallIcon(R.drawable.logo128x128)
                    .setContentText("hello")
                    .setVibrate(new long[] {1000l});

    notificationManager.notify(0, notificationBuilder.build());

在任何设置下都不会关闭振动。

那么问题来了,为什么磨损不振动?

【问题讨论】:

    标签: android wear-os


    【解决方案1】:

    连接 USB 数据线进行调试时,手表不会振动通知。 拔下 USB 数据线会再次振动。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-11-06
      • 1970-01-01
      • 1970-01-01
      • 2018-04-11
      • 1970-01-01
      • 2017-01-03
      • 2023-03-16
      相关资源
      最近更新 更多