0

I've been trying for a while and I can't send a vibration to my SmartWatch 2. I'm just editing one of the sample codes, so it would be relatively easy. This is the code fragment:

// Show something
            TextView prueba = (TextView)sensorLayout.findViewById(R.id.prueba);
            if(Math.abs(values[0])>Math.abs(values[1]) & Math.abs(values[0]) > Math.abs(values[2])) {
                prueba.setText("Hacia un lado");
                startVibrator(1000,500, 3); // Does nothing.

            }
            else if(Math.abs(values[1])>Math.abs(values[0]) & Math.abs(values[1]) > Math.abs(values[2])) {
                prueba.setText("Hacia delante o hacia atrás");
            }
            else {
                prueba.setText("Horizontal");
            }

The messages are working, but the vibration never do.

Alberto Castaño
  • 186
  • 5
  • 16

1 Answers1

0

The code looks correct to me. Only possibilities I can think of here are:

  1. The startVibrator method is not being called. Are you sure it's going into the "if" statement?
  2. The vibration on your watch is broken.
mldeveloper
  • 2,253
  • 1
  • 13
  • 14