title: How to start video view when buffering reaches percentage that i want (20%) android
body: <p>I want to stream video from url.When buffer reached 20% i want to start video in the same moment.Here is my code...</p>
  
  <pre><code> public class MainActivity extends AppCompatActivity implements SurfaceHolder.Callback, MediaPlayer.OnPreparedListener {
  
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_main);
  
         final VideoView vidView = (VideoView) findViewById(R.id.myVideo);
         MediaController vidControl = new MediaController(this);
         vidControl.setAnchorView(vidView);
         vidView.setMediaController(vidControl);
  
  
         String vidAddress = "http://d38e3g3vk5nrvg.cloudfront.net/1452268197713.mp4";
  
         Uri vidUri = Uri.parse(vidAddress);
         vidView.setVideoURI(vidUri);
         vidView.start();
  
         vidView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
              public void onPrepared(MediaPlayer mp) {
  
                 mp.setOnBufferingUpdateListener(new MediaPlayer.OnBufferingUpdateListener() {
                     @Override
                     public void onBufferingUpdate(MediaPlayer mediaPlayer, int i) {
                         Log.d(TAG, "onBufferingUpdate: " + i);
                         if (i &gt;= 20) {
                             Log.d(TAG, "onBufferingUpdate: &gt;= 20");
                             vidView.start();
  
                         }
                     }
                 });
  
              }
          });
     }
  </code></pre>
  
  <p>The problem is when buffering reach 20% video didn't start ... start when reached 50% every time... but this is too much waiting for users when video is bigger.Thank you in advance!</p>