在通知时振动Android Wear设备

Sam*_*Sup 8 android android-notifications android-vibration wear-os

我正在尝试开发一款适用于Android和Android的应用程序.我创建了从手机到手表的通知.

notification = new NotificationCompat.Builder(context)
                    .setSmallIcon(icon)
                    .setVibrate(new long[]{1000, 1000, 1000, 1000, 1000, 1000})
                    .setContentTitle(title)
                    .setContentText(content)
                    .setStyle(bigStyle.bigText(content))
                    .setLargeIcon(BitmapFactory.decodeResource(context.getResources(), background))
                    .build();
Run Code Online (Sandbox Code Playgroud)

在我设置的手表清单中:

<uses-permission android:name="android.permission.VIBRATE"/>
Run Code Online (Sandbox Code Playgroud)

不幸的是,我没有任何振动.

我能怎么做 ?

谢谢.

and*_*ast 9

 .setDefaults(Notification.DEFAULT_ALL)
Run Code Online (Sandbox Code Playgroud)

这行代码将使磨损唤醒并振动.