@Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_player);
    mVideoPath = getIntent().getStringExtra("videoPath");
    Intent intent = getIntent();
    String intentAction = intent.getAction();
    if (!TextUtils.isEmpty(intentAction) && intentAction.equals(Intent.ACTION_VIEW)) {
      mVideoPath = intent.getDataString();
    }

    mBufferingIndicator = findViewById(R.id.buffering_indicator);
    mMediaController = new MediaController(this);

    mVideoView = (VideoView) findViewById(R.id.video_view);
    mVideoView.setMediaController(mMediaController);
    mVideoView.setMediaBufferingIndicator(mBufferingIndicator);
    mVideoView.setVideoPath(mVideoPath);
    mVideoView.requestFocus();
    mVideoView.start();
  }