title: Hold button howto
body: <p>I need a hold button in android java. I tried with setOnTouchListener and it worked. But it is little too fast.
  Is it possible to make the button slower, and to send value when the hold is let off for the same button?</p>
  
  <pre><code>    buttonB.setOnTouchListener(new View.OnTouchListener() {
      @Override
      public boolean onTouch(View v, MotionEvent event) {
          yon=",B,";
          set++;
  
          if(set==360) set = 0;
  
  
          sensorView2.setText(set);
          packet+=set+yon;
  
          mConnectedThread.write(packet);
  </code></pre>