-
Notifications
You must be signed in to change notification settings - Fork 404
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
Most File Managers don't support Open Folder Intent #838
Comments
This Stackoverflow thread has some more options, like different mime types. Might be worth a try ping @PaulAnnekov |
I googled all the web and checked many SO questions. Immediately remove answers with And |
Did you try the mime type |
I tried
|
This is a hard choice here:
Wouldn't it be possible to use |
@pchampin no, 1st option is "use embedded file manager", 2nd is "use intent that is supported by 1-2 file managers among dozens in the market + add ugly hack for Android 7".
I don't know if you have an access to "use as default app..." checkbox in intents chooser, but I think - no. |
goal:
since it seems there is no standard for this so whe should define the standard and ask the other file manager developers to implement this specific intent we define here. my proposal: use this: https://stackoverflow.com/questions/17165972/android-how-to-open-a-specific-folder-via-intent-and-show-its-content-in-a-file
@contrapunctus-1 already made an attempt to ask file manager developers but without specifying how the intent should exactly look like. note: total commander supports action=android.intent.action.VIEW with mime= * / * . i donot know if there is a more specific mime for total commander specific mime for this. There is also the proposal to use mime=resource/folder ( https://www.ghisler.ch/board/viewtopic.php?p=323853 ) |
@k3b yes, we can ask file manager devs to implement one of the API's, it requires a minimum of effort (but don't rely on them). Who will do this? |
FTR, there is already an issue about that for the open-source Amaze file manager: |
Hello everyone, I'm new to synthing. |
@vishal0071 This button will launch an intent to open the folder path in an external file manager: |
@Nutomic so what is the option supposed to do? Simply open the file manager from that specific path? |
Yes exactly |
Very well. I've added support in Amaze for this form of intent. |
I was made aware that there exists API to denote a directory mime type. Please check it here and make syncthing compatible to this so that I can also reflect to these changes. |
That intent seems pretty bad. With |
@Nutomic sorry my fault: only version with file:///path.... works. the version with file:/path.... does not. I just checked it with the new IntentIntercept https://gitlab.com/fdroid/fdroiddata/merge_requests/2553 and ES Explorer. I have just fixed my proposal in all threads where i added the proposal text. |
This is the code I'm using, so Uri is something like
And its not working with ES Explorer (not sure which other apps I should test. Like I said, the resource/folder mime type at least works with ES Explorer. |
@Nutomic Please use |
@vishal0071 Good point about FileProvider, I wasn't aware of that API. I still had to declare Edit: actually it doesn't work with ES Explorer. Either it doesn't show any folder contents, or it's loading forever. |
Added support for opening resource/folder to Simple File Manager, for now only for "file://" uris. I will check the rest later. |
@VishalNehra @k3b @pchampin @PaulAnnekov Hi together. I implemented a fallback mechanism in a debug build if resource/folder approach did not work to open the folder. Can you please check if it helps in cases a specific file explorer app was previously not supported? Link: https://build.syncthing.net/repository/download/SyncthingAndroid_Build/19963:id/debug/app-debug.apk |
@Catfriend1 that's what I get. I have Xiaomi device with native File Explorer app. I don't know why this issue was closed. I think the only way to close it is to use embedded file manager, because we won't ever support all variety of file managers, as there is no standard way to achieve what we want. |
@PaulAnnekov Sorry, this seems to be hard way to find a compromise for all software out there. Let's sum up what we got now. If you click the open folder button, this will happen:
This is also the reason why all apps are shown to you on the screenshot. Looking with the "all" file type results in all apps being shown. I'd have liked to, but android won't let me filter out any app from there. Built-In file managers afaik also don't have a common UI resource type they register. Some have, some won't. I'm pretty sorry it seems I only can help you if you figure out the URI type your built-in file manager listens to and put it maybe in between the checks of step 1) and 2) making sure the fallback is done correctly for the majority of users. |
My point is that this issue should not be closed, because it's not resolved. And the only way to resolve it is to create embedded file manager. |
Agreed. @Catfriend1 please don't close issues if people still have the problem. |
Here is a good SO showing alternatives and on which devices they are expected to work: https://stackoverflow.com/questions/50072638/fileuriexposedexception-in-android/50102119#50102119 |
@PaulAnnekov Would you mind helping me out by figuring out and posting your builtin file managers android package name here? Its sth like com.romname.filemanager. |
@Catfriend1 |
@PaulAnnekov |
@Catfriend1 I want every user to be able to browse synced folder from Syncthing. And I think the best way to do this is to implement it like other file clouds do - manage files directly in the app (Dropbox, Google Drive, ownCloud...). I don't force you to implement it or to support all external file managers. |
SideNote - I tried to implement opening syncthing folder using Samsung myFiles but it doesn't work. In case anyone reading this later has an idea, please give me a hint. Link to the branch code: master...Catfriend1:supportSamsungFileManager |
#831 (comment)
https://forum.syncthing.net/t/poll-open-folder-button-and-file-managers/9067
The text was updated successfully, but these errors were encountered: