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

Changing target directory #54

Closed
Cdik opened this issue Nov 1, 2017 · 3 comments
Closed

Changing target directory #54

Cdik opened this issue Nov 1, 2017 · 3 comments

Comments

@Cdik
Copy link

Cdik commented Nov 1, 2017

Hi,

First, thanks for this library :) It has been very useful for me.

Is there a way I can choose the target folder of the recorded video?
I have seen that your VideoFile.class is creating a Movies directory with the getFile() function but how can I override it?

Thanks in advance.
Cedric

@JeroenMols
Copy link
Owner

Currently there is no way to do that, but that would seem like a meaningful feature for this library. So if you're up for building it, I'll gladly take a pull request.

@Cdik
Copy link
Author

Cdik commented Nov 28, 2017

Hi,

I have made a pull request (my first pull request ever!) regarding the "choose target directory" feature.

I tried to follow as much tutorials as I could to make this pull request as clear as possible but if I made a mistake or forgot something, my apologizes.

(I made this pull request in your master branch.... is that okay or was I supposed to use the develop branch?)

First I wanted to implement like a "folder chooser" but it was a bit too much of changes for a first pull request :/ so I have made sort of a "create folder" feature which creates the folder if it does not exist, otherwise, does nothing than target the desired directory.

Here's a brief summary of what I have done:

  • Added an optional extra to the VideoCaptureActivity as EXTRA_OUTPUT_DIRECTORY
    • this extra (a string) is the name of your folder (or sub-folder, see below)
  • Added this feature to the example CaptureDemoFragment
    • as an EditText where you enter the name of your folder (or sub-folder if you enter e.g. folder/sub-folder). When the EditText doesn't have focus anymore, it's automatically filled with the entire external directory path (in grey the default root path followed by your folder/sub-folder name in black). When the EditText gain focus again, the default root path is cleared out, leaving only what you have typed in - to avoid confusions.
  • I have also updated the Readme file.
  • I haven't touched the version number/code. I have absolutely no clue if I should have done it or not.
  • I have updated the buildToolsVersion from 26.x to 27.x and the gradle version from 3.x to 4.x - but again, I did that to suits my needs but don't really know if I was suppose to do that or not, or if it affects you somehow.

Voilà. Hope this is not too far from the good methodology :)
BR
Cedric

@luoolu
Copy link

luoolu commented Feb 2, 2018

I encountered the same problem about Changing target directory ,
When to take a pull request?
It has been very useful for me.

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

3 participants