content: package com.gowtham.videotrimmer;
  
  import android.app.Activity;
  import android.content.Intent;
  import android.os.Bundle;
  
  import androidx.activity.result.ActivityResult;
  import androidx.activity.result.ActivityResultCallback;
  import androidx.activity.result.ActivityResultLauncher;
  import androidx.activity.result.contract.ActivityResultContracts;
  import androidx.fragment.app.Fragment;
  
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  
  import com.gowtham.library.utils.CompressOption;
  import com.gowtham.library.utils.TrimVideo;
  
  public class MainFragment extends Fragment {
  
      ActivityResultLauncher<Intent> launchSomeActivity = registerForActivityResult(
              new ActivityResultContracts.StartActivityForResult(),
              new ActivityResultCallback<ActivityResult>() {
                  @Override
                  public void onActivityResult(ActivityResult result) {
                      if (result.getResultCode() == Activity.RESULT_OK) {
                         //handle trimmed video result
                      }
                  }
              });
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          return inflater.inflate(R.layout.fragment_main, container, false);
      }
  
      private void callFragment(){
          TrimVideo.activity("data")
                  .setCompressOption(new CompressOption()) //pass empty constructor for default compress option
                  .start(this,launchSomeActivity);
      }
  }