title: Android: Increase responsiveness of phone screen?
body: <p>Is there a way to increase responsiveness of a device for a particular application? Specifically, right now my touch events are definitely triggering, but they are delayed by a fraction of a second. Since my application is a music/rhythm app, any delay is very bad. I was just wondering, if there was anything I can do in the Manifest that would increase responsiveness. Or perhaps some suggestions for making the code work faster? I have to create multiple threads in the app as well to handle multitouch, perhaps there is  an efficient way of doing that? </p>
  
  <p>Best,
  Aneem</p>
  
  <p>EDIT:</p>
  
  <pre><code>public boolean onTouchEvent(final MotionEvent ev) {
      if(ev.getAction()==ev.ACTION_DOWN||ev.getActionMasked()==ev.ACTION_POINTER_DOWN){                   
          AudioManager mgr = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE);
          int streamVolume = mgr.getStreamVolume(AudioManager.STREAM_MUSIC);
          PointF[] touchPoints = new PointF[ev.getPointerCount()];
          for(int i = 0; i &lt; ev.getPointerCount(); i++){
              touchPoints[i] = new PointF(ev.getX(i),ev.getY(i));
          }
          for(final PointF point : touchPoints){
              x = ev.getX(ev.getActionIndex());
              y = ev.getY(ev.getActionIndex());
              int ptx = (int) (x - x%widthIncrement);
              int pty = (int) (y - y%heightIncrement);
              playSound(pointMap.get(new Point(ptx,pty)));
          }
          return true;
      }
      return true;
  }
  
  public void playSound(int sound){
      AudioManager mgr = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE);
      int streamVolume = mgr.getStreamVolume(AudioManager.STREAM_MUSIC);
      database.play(sound, streamVolume, streamVolume, 1, 0, 1);
  }
  </code></pre>