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

Please support the open folder intent #84

Closed
contrapunctus-1 opened this issue Sep 5, 2017 · 10 comments
Closed

Please support the open folder intent #84

contrapunctus-1 opened this issue Sep 5, 2017 · 10 comments

Comments

@contrapunctus-1
Copy link

contrapunctus-1 commented Sep 5, 2017

Applications like Syncthing require it to open folders.
See also syncthing/syncthing-android#838

@k3b
Copy link

k3b commented Oct 7, 2017

goal:

  • Intent to open filemanager and view content of a specified directory in the filemanager.
  • This feature should not be a picker

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
it already works with "EF File Explorer"

  • action=android.intent.action.VIEW
  • data=file:///path/to/directory/
  • mime=resource/folder

[Update 2017-10-09] fixed typo in data. need data=file:///path/to/directory/ instead of data=file:/path/to/directory/

@tibbi
Copy link
Contributor

tibbi commented Oct 7, 2017

picker and viewer are 2 different things, I will get there someday

@k3b
Copy link

k3b commented Oct 8, 2017

thanks a lot

@k3b
Copy link

k3b commented Feb 27, 2018

works great in k3b/APhotoManager#99 . thanks a lot

@iNPUTmice
Copy link

Can you also support getting the file path from org.openintents.extra.ABSOLUTE_PATH as described here: http://www.openintents.org/action/android-intent-action-view/file-directory. Modern Androids (API 24+) do not allow file uris to be transmitted in the data field of an intent. (FileUriExposedException). Should be a 2 line fix. I’m happy to contribute that fix myself if you don’t have any principle objections to handling it that way.

@tibbi
Copy link
Contributor

tibbi commented Feb 15, 2019

sorry but no, that intent is a custom one belonging to a specific app, not a widely used one

@iNPUTmice
Copy link

iNPUTmice commented Feb 15, 2019 via email

@tibbi
Copy link
Contributor

tibbi commented Feb 15, 2019

I will check someday how should it be handled, for now I dont want to add custom intent handling

@k3b
Copy link

k3b commented Mar 14, 2019

@iNPUTmice

that intent is a custom one belonging to a specific app

I donot like app specific tags, too but at least it is documented which is much more than most other custom tags.

I will add it to my apps as last fallback-try if nothing else works.


Maybe we should create a simple android lib at github and publish at jcenter/mavencentrals for the task "open directory folder" with client-app and service-app code.

then @tibbi can add something linke this to Simple-File-Manager:

 String folderToBeopend = FileIntentApi.getOpenInDirectory(this.getIntent());
 if (folderToBeopend  != null) ... do open in directory code ..... 

@humpity
Copy link

humpity commented Nov 2, 2020

ShareCompat (support.v4) uses setStream(uri) which is really an Intent.ACTION_SEND with a putExtra(Intent.EXTRA_STREAM, uri).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants