I'm trying to develop a Wear OS application using Android Studio, that will activate the vibration for long periods of time, but unfortunately as soon as the watch turns off the screen, or switches to standby mode, the vibration stops working. I use this to activate the vibration:
vibrator = (Vibrator) getSystemService(VIBRATOR_SERVICE);
and:
long[] vibrationPattern = {0, pulseTime, breakTime};
vibrator.vibrate(VibrationEffect.createWaveform(vibrationPattern, 0));
I hope you can help me, thanks for the helpers.
I tried to keep the application running in the background, with the help of WAKE_LOCK
And I also tried to develop the application as a watch face
And nothing I tried worked.