Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updation: Validation for minGap #3

Closed
rahul4452 opened this issue Aug 13, 2020 · 2 comments
Closed

Updation: Validation for minGap #3

rahul4452 opened this issue Aug 13, 2020 · 2 comments

Comments

@rahul4452
Copy link

Hello, @a914-gowtham great work. Just one query or you can say update that there is no message on minGap like when users add video less than the required minGap.

Thanks for this work.

@a914-gowtham
Copy link
Owner

a914-gowtham commented Aug 13, 2020

Hi @rahul4452 ,you could validate video duration using this snippet before you open the trimmer activitity

 //checking video duration on onactivityResult after video selected from gallery or taken with camera
              if (TrimmerUtils.getVideoDuration(this,data.getData())<=30){
                   Toast.makeText(this,"Video duration should be larger than 30 sec",Toast.LENGTH_SHORT).show();
               }else{
                        Intent intent=new Intent(this,ActVideoTrimmer.class);
                        intent.putExtra(TrimmerConstants.TRIM_VIDEO_URI,String.valueOf(videoUri));
                        intent.putExtra(TrimmerConstants.TRIM_TYPE,0); //optional: it will take by default
                        startActivityForResult(intent,TrimmerConstants.REQ_CODE_VIDEO_TRIMMER);
}

@rahul4452
Copy link
Author

Thanks, @a914-gowtham for the solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants