skunkworks-crow icon indicating copy to clipboard operation
skunkworks-crow copied to clipboard

feat: Made Directory Picker instead of edittext

Open ajay-prabhakar opened this issue 5 years ago • 7 comments

Closes #250

What has been done to verify that this works as intended?

Checked whether selected Directory is taking as a summary and file path value Checked all other preferences whether they are working properly or not Checked in some phones(Android 7,8,9) whether the intent is working properly or not Checked whether it is taking sdCard or not along with internal storage Checked whether it is working perfectly in lower android devices

Why is this the best possible solution? Were any other approaches considered?

As due to there is no default file manager in lesser android devices so the devices lesser than API 19 will get the editText for a directory path and greater android devices will get the directory picker so they directly can pick the whatever the folder they want

Implementation of Directory picker I made Intent Intent.ACTION_OPEN_DOCUMENT_TREE so by clicking on that we can see all files in a device
By that, I added another method onActivityResult so we can get the file path through (data.getData()).getPath() without any typos

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

Mainly, It will avoid the typos regarding Directory names and user can directly select the Directory easily

GIF

Greater Android Devices

ezgif com-video-to-gif

Lesser android Devices

ezgif com-video-to-gif

Before submitting this PR, please make sure you have:

  • [x] run ./gradlew checkCode and confirmed all checks still pass OR confirm CircleCI build passes
  • [x] verified that any code or assets from external sources are properly credited in comments and/or in the about file.

ajay-prabhakar avatar Apr 29 '19 12:04 ajay-prabhakar

Also resolve conflicts.

lakshyagupta21 avatar Jun 04 '19 18:06 lakshyagupta21

@Chromicle Are you still working on this, because I see that few of the above issues are still not resolved related to lower Android devices

lakshyagupta21 avatar Aug 18 '19 04:08 lakshyagupta21

@Chromicle Are you still working on this, because I see that few of the above issues are still not resolved related to lower Android devices

@lakshyagupta21 I resolved in the way that for android version less than KitKat they will get the edit text and android versions greater than that will get the directory picker I pick this approach because we can not the data from the path of lesser android versions

ajay-prabhakar avatar Aug 18 '19 06:08 ajay-prabhakar

@Chromicle I would recommend you to run ./gradlew checkCode on every commit you push because sometimes we miss something due to which it fails and also check the checkboxes in the PR description that you've done both the things mentioned there.

Before submitting this PR, please make sure you have:

  • [ ] run ./gradlew checkCode and confirmed all checks still pass OR confirm CircleCI build passes
  • [ ] verified that any code or assets from external sources are properly credited in comments and/or in the about file.

lakshyagupta21 avatar Aug 18 '19 06:08 lakshyagupta21

@Chromicle Please update your PR template.

lakshyagupta21 avatar Aug 18 '19 07:08 lakshyagupta21

@Chromicle Please update your PR template.

Yeah I updated can you please check it

ajay-prabhakar avatar Aug 18 '19 09:08 ajay-prabhakar

@Chromicle due to some recent commits, now this PR again have some merge conflicts can you resolve them, and do a dev testing like transfer a form from one device to another and check if you're able to see the entries in the selected directory or not.

lakshyagupta21 avatar Aug 18 '19 12:08 lakshyagupta21