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

Handle external intents to open folder locations #3305

Merged
merged 13 commits into from
May 17, 2022

Conversation

VishnuSanal
Copy link
Member

Description

Automatic tests

  • Added test cases

Manual tests

  • Done

  • Device: Pixel XL API 31 Emulator

    • OS: Android 12
    • Tested by locating a file from AFU both from internal storage & SD card
  • Device: Realme Narzo 20A

    • OS: Android 11
    • Tested by locating a file from AFU from internal storage

Build tasks success

Successfully running following tasks on local:

  • ./gradlew assembledebug
  • ./gradlew spotlessCheck

@VishnuSanal
Copy link
Member Author

Build test APK

@VishalNehra
Copy link
Member

That's it?

@VishnuSanal
Copy link
Member Author

VishnuSanal commented May 8, 2022

@VishalNehra Um, yes... The main problem was a trailing /storage_root to the path. I used FileUtils#fromContentUri to get rid of that - seems like that works during initial testing. Need more testing though, from different file locations.

@VishalNehra
Copy link
Member

Working great! Nice work! However, as asked originally, it's better if we can also scroll to the item and highlight it. It's super useful specially for places with large directory items.

@VishnuSanal
Copy link
Member Author

@VishalNehra Oops! I forgot about that altogether 🙈 Will look into it, ASAP

@VishnuSanal
Copy link
Member Author

Working great! Nice work! However, as asked originally, it's better if we can also scroll to the item and highlight it. It's super useful specially for places with large directory items.

@VishalNehra AFU only gives the path to the containing folder! How to scroll to the selected file with this path?

@VishalNehra
Copy link
Member

@VishnuSanal It doesn't give path to the file?

@VishnuSanal
Copy link
Member Author

VishnuSanal commented May 10, 2022

@VishalNehra Nope, please note, I just loaded the path - didn't trim the name or anything

@VishnuSanal
Copy link
Member Author

VishnuSanal commented May 10, 2022

@VishalNehra Maybe, we can do something for AFU only, and ship it as is for intents from other apps.

Add the file name or path to the bundle from AFU, with key starting with our package name. Then, we can check for it & handle that case.

What say?

Edit: Convo continued here

@VishalNehra
Copy link
Member

Why is the build failing?

@VishnuSanal
Copy link
Member Author

Why is the build failing?

Um... I can't find a reason, running spotlessApply on local do not generate any changes. Even Android Build CI / Check spotless (push) passes. Any suggestions?

@VishalNehra
Copy link
Member

Try running cleaning project and rebuilding.

@VishnuSanal
Copy link
Member Author

Try running cleaning project and rebuilding.

Done, still the same 😔

@VishalNehra VishalNehra added this to the v3.7.1 milestone May 17, 2022
@VishalNehra VishalNehra merged commit a003958 into hotfix/3.7.1 May 17, 2022
@VishnuSanal VishnuSanal deleted the locate-file-afu branch May 17, 2022 21:15
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

Successfully merging this pull request may close these issues.

2 participants