title: android runtime error vibration
body: <p><img src="https://i.stack.imgur.com/mdRpE.png" alt="enter image description here">
  have only 2 vibration calls in my app</p>
  
  <pre><code>1. Vibration Call 
  
  listView.setOnItemClickListener(new OnItemClickListener() {
      public void onItemClick(AdapterView&lt;?&gt; parent, final View view,
                          int position, long id) {
  ...
      vibrator.vibrate(200);
  ...}
  }
  
  2. Vibration Call    
  
  public void onSensorChanged(SensorEvent event) {
              if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {
      }
      ....
  //z axes accelerator changes
      long[] pattern = { 0, 200, 200 };
                      vibrator.vibrate(pattern, 3);
      }}
  </code></pre>
  
  <p>I think first one is coasing the error.</p>
  
  <p>I really do not see any error.</p>
  
  <p>Its my first time programming vibration.</p>
  
  <p>How do I fix this?</p>