content: package jonesx.videoplayer;
  
  import android.Manifest;
  import android.os.Bundle;
  import android.os.Environment;
  import android.support.v4.app.ActivityCompat;
  import android.support.v7.app.AppCompatActivity;
  import android.util.Log;
  import android.view.SurfaceHolder;
  import android.view.SurfaceView;
  
  public class MainActivity extends AppCompatActivity implements SurfaceHolder.Callback {
  
      SurfaceHolder surfaceHolder;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          ActivityCompat.requestPermissions(this, new String[]{
                  Manifest.permission.READ_EXTERNAL_STORAGE}, 100);
          SurfaceView surfaceView = (SurfaceView) findViewById(R.id.surface_view);
          surfaceHolder = surfaceView.getHolder();
          surfaceHolder.addCallback(this);
          Log.v("zzw", Environment.getExternalStorageDirectory()
                  .getAbsolutePath() );
      }
  
  
      @Override
      public void surfaceCreated(SurfaceHolder holder) {
          new Thread(new Runnable() {
              @Override
              public void run() {
                  VideoPlayer.play(surfaceHolder.getSurface());
              }
          }).start();
      }
  
      @Override
      public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
  
      }
  
      @Override
      public void surfaceDestroyed(SurfaceHolder holder) {
  
      }
  }
  