Skip to content
This repository has been archived by the owner on May 30, 2021. It is now read-only.

VideoPicker Class

Abdullah Alhazmy edited this page Sep 11, 2016 · 1 revision
  1. Create an object from VideoPicker
  2. Override onActivityResult to receive the path of video.

Create VideoPicker

You will need to create a new instance of VideoPicker. Once the instance are configured, you can call build().

        new VideoPicker.Builder(this)
                .build();

Override onActivityResult

In order to receive the path of video, you will need to override onActivityResult .

   @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if (requestCode == VideoPicker.VIDEO_PICKER_REQUEST_CODE && resultCode == RESULT_OK) {
            String mPath = data.getStringExtra(VideoPicker.EXTRA_VIDEO_PATH);
            //Your Code
        }
    }