I'm trying to develop an app for android and Android Wear (Wear OS). I create a Notification
from the mobile to the watch.
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();
In the manifest of the watch I set:
<uses-permission android:name="android.permission.VIBRATE"/>
Unfortunately, there is no vibration. How can I fix it?
Thanks.
.setDefaults(Notification.DEFAULT_ALL)
This line of code will make the wear wake up and vibrate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With