-
Notifications
You must be signed in to change notification settings - Fork 218
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
Please support the open folder intent #87
Comments
There is no such standard Intent as far as I am aware, would you mind elaborating on the options? |
We support the intent to pick a folder
org.openintents.action.PICK_DIRECTORY
Am 06.09.2017 09:01 schrieb "George Venios" <notifications@github.com>:
… There is no such standard Intent as far as I am aware, would you mind
elaborating on the options?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#87 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABYcWS3JTFFoj1vGngkVJy_yH0OaHfP1ks5sfkNegaJpZM4PNJdU>
.
|
If I'm not mistaken this request is for pointing the file manager to launch on an arbitrary path, but without offering any further action like "pick" - at least according to the linked issue :) |
You want something like action VIEW with mime type like
vnd.android.documents/directory?
https://stackoverflow.com/questions/18869772/mime-type-for-a-directory
What is the URI scheme you want to view? Probably one of FileProvider.
Am 06.09.2017 09:35 schrieb "George Venios" <notifications@github.com>:
If I'm not mistaken this request is for pointing the file manager to launch
on an arbitrary path, but without offering any further action like "pick" -
at least according to the linked issue :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#87 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABYcWTzH8IltIK6OlEGu2noc4Vn3oF2lks5sfktAgaJpZM4PNJdU>
.
|
goal:
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
|
I am worried about the non-standard mime type, as well as the FileUriExposedException when using the file schema. Could you please propose something with FileProvider? |
I agree that we should use the "standard". Unfortunately there is none (at least none i am aware of or one that is widley known or widly implemented) In my opinion the best way is to use something that other have implemented or is willing/planning/thinking about to implement. therefore i am lobbying for this proposal.
If you think that we should follow an other "standard" as discussed in https://stackoverflow.com/questions/18869772/mime-type-for-a-directory it may be a compromise and easy to to implement several different "standards":
If you think we should use a different format, please let us know which one you like to support so i will integrate additional logic into my own "show in filemanager" logic to try different standards fileuriexposedexception since android n/sdk-24 does this mean we have to hide "file:" from android if we want to have a "show in filemanager" function in our apps ? |
I would go for And yes, you should get ride of the file scheme. |
ok thanks for feedback. my app will try vnd.android.document/directory and if not found try resource/folder |
I have created a sample app on https://github.com/openintents/directory-type As the uri does not contain any hints about the directory path, you need to add an extra string with the absolute path in your VIEW action. I suggest something like the provider column name of MediaStore https://developer.android.com/reference/android/provider/MediaStore.MediaColumns.html#DATA or the extra to show the initial folder when opening a document https://developer.android.com/reference/android/provider/DocumentsContract.html#EXTRA_INITIAL_URI My suggestion is
|
i woult propose to use org.openintents.extra.ABSOLUTE_PATH. this way it is compatible with the other view actions without the need for a new extra parameter. |
I have added documentation for this at Thanks for the discussion! |
Fixed typo in intents to open dir for #87: singular instead of plural…
Applications like Syncthing require it to open folders.
See also syncthing/syncthing-android#838
The text was updated successfully, but these errors were encountered: