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

Support VIEW_DIRECTORY intent #791

Open
PanderMusubi opened this issue Oct 1, 2017 · 17 comments
Open

Support VIEW_DIRECTORY intent #791

PanderMusubi opened this issue Oct 1, 2017 · 17 comments
Labels
Issue-Feature A feature request or improvement. Issue-Task (low) This isn't a bug, but should be dealt with.

Comments

@PanderMusubi
Copy link

Please, support VIEW_DIRECTORY intent in order for other apps to find AmazeFileManager as a file manager to use. For more details, see IvanVolosyuk/diskusage#42 (comment)

@VishalNehra
Copy link
Member

Please see #640

@EmmanuelMess
Copy link
Member

@vishal0071 As far as I can tell #640 deals with files, not folders, VIEW_DIRECTORY would open a directory in a file manager, not a file.
@PanderMusubi Can you link some documentation on "org.openintents.action.VIEW_DIRECTORY"?

@PanderMusubi
Copy link
Author

In this case, I am just the messenger. Sorry, con't help you with this.

@ildar
Copy link

ildar commented Oct 3, 2017 via email

@k3b
Copy link

k3b commented Oct 8, 2017

since i need this feature, too here is a summary from my point of view

Feature request:

allow other apps to open the installed filemanager to show all files/subdirectories that are inside a given directory through an intent api:

(note this is slightly different from a file picker or dir picker)


Technical details:

  • action=android.intent.action.VIEW
  • data=file:///path/to/directory/
  • mime=vnd.android.document/directory (android api-19 DocumentsContract.Document.MIME_TYPE_DIR already implemented by diskusage)

alternatives used

see also syncthing/syncthing-android#838

note: when i open amaze v3.2.1 (fdroid build) on my android-4.4.2 with

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

amaze currently crashes


amaze crash

D/ActivityThread: ACT-NEW_INTENT handled : 0 / NewIntentData{intents=[
Intent {
act=android.intent.action.VIEW
dat=file:/storage/sdcard0/copy/neu/
typ= * / *
flg=0x13400000
cmp=com.amaze.filemanager/.activities.MainActivity }] token=android.os.BinderProxy@42061fd0}
...
W/System.err: java.lang.RuntimeException: Unable to resume activity {com.amaze.filemanager/com.amaze.filemanager.activities.MainActivity}: java.lang.StringIndexOutOfBoundsException: length=3; regionStart=0; regionLength=-1
W/System.err: at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2964)
W/System.err: at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2993)
W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)
W/System.err: at android.os.Handler.dispatchMessage(Handler.java:110)
W/System.err: at android.os.Looper.loop(Looper.java:193)
W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5299)
W/System.err: at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err: at java.lang.reflect.Method.invoke(Method.java:515)
W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:825)
W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:641)
W/System.err: at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
W/System.err: at dalvik.system.NativeStart.main(Native Method)
W/System.err: Caused by: java.lang.StringIndexOutOfBoundsException: length=3; regionStart=0; regionLength=-1
W/System.err: at java.lang.String.startEndAndLength(String.java:588)
W/System.err: at java.lang.String.substring(String.java:1475)
W/System.err: at com.amaze.filemanager.fragments.ZipViewer.onActivityCreated(ZipViewer.java:223)
W/System.err: at android.support.v4.app.Fragment.performActivityCreated(Fragment.java:2201)
W/System.err: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1326)
W/System.err: at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528)
W/System.err: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595)
W/System.err: at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:758)
W/System.err: at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2363)
W/System.err: at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2149)
W/System.err: at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2103)
W/System.err: at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2013)
W/System.err: at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:388)
W/System.err: at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:607)
W/System.err: at android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:178)
W/System.err: at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1174)
W/System.err: at android.app.Activity.performStart(Activity.java:5274)
W/System.err: at android.app.Activity.performRestart(Activity.java:5330)
W/System.err: at android.app.Activity.performResume(Activity.java:5335)
W/System.err: at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2950)
W/System.err: ... 11 more
W/dalvikvm: threadid=1: calling UncaughtExceptionHandler

@VishalNehra VishalNehra added Issue-Task (low) This isn't a bug, but should be dealt with. and removed medium labels Oct 8, 2017
@k3b
Copy link

k3b commented Oct 8, 2017

this is a duplicate of #419

@VishalNehra
Copy link
Member

I've pushed a fix, please test when beta version comes out.

@k3b
Copy link

k3b commented Oct 9, 2017

will the betta be available at https://androidfilehost.com/?w=files&flid=73973 ? i have no playstore/google-account.

If not i can download the sources and compile myself.

@k3b k3b mentioned this issue Feb 28, 2018
@PanderMusubi
Copy link
Author

I have installed version 3.2.2 (64) 2018-06-24 via F-Droid app store, but DiskUsage version 3.8.0 (3080) 2017-08-30, see IvanVolosyuk/diskusage#42 , is not finding Amaze as a file manager.

screenshot_20181126-133436

This issue needs another attempt to get fixed.

@VishalNehra
Copy link
Member

Maybe try with latest play store version? v3.3.0 @PanderMusubi

@PanderMusubi
Copy link
Author

I'm seeing that F-Droid is picking up a new release, but that there is a problem. Shall we get that fixed first? Please see https://gitlab.com/fdroid/fdroiddata/blob/master/metadata/com.amaze.filemanager.txt

@PanderMusubi
Copy link
Author

@VishalNehra , just tested with 3.3.0 from Google Play, issue is still there.

(Create another issues for F-droid build problem?)

@guillaume-d
Copy link

@PanderMusubi Tried to bump #1280, let's see what happens.

@PanderMusubi
Copy link
Author

Just checked, still same problem with version 3.3.2. Any ideas on how to get this fixed?

@EmmanuelMess
Copy link
Member

Okay, from reading the code added in 2c14ba5 and @k3b's comment, this seems to be the problem: the mime we detect is resource/folder but only some apps actually use it, vnd.android.document/directory would be the one that would be the one you seem to need.

@PanderMusubi
Copy link
Author

Any progress regarding this issue so that other apps can use Amaze as file manager?

@EmmanuelMess
Copy link
Member

@PanderMusubi no, I don't think so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature A feature request or improvement. Issue-Task (low) This isn't a bug, but should be dealt with.
Projects
None yet
Development

No branches or pull requests

6 participants