Open newhinton opened 6 months ago
No, I don't know. Historically, file manager apps were competing between each other. There was no generic intent to open a file manager at a specific directory. What app would ever do that other than another file manager?
On Fri, Jan 12, 2024, 19:18 Felix Nüsse @.***> wrote:
@.**** commented on this pull request.
In app/src/main/java/com/google/android/diskusage/ui/filemanagers/DocumentsUIFilemanager.kt https://github.com/IvanVolosyuk/diskusage/pull/93#discussion_r1450022825 :
@@ -0,0 +1,33 @@ +package com.google.android.diskusage.ui.filemanagers + +import android.app.Activity +import android.content.Intent +import android.net.Uri +import android.provider.DocumentsContract +import android.util.Log +import com.google.android.diskusage.filesystem.entity.FileSystemEntry + +class DocumentsUIFilemanager(mEntry: FileSystemEntry, mActivity: Activity) : ExternalFileManager(mEntry, mActivity) { +
- override fun getFilemanagerIntent(): Intent {
- // Documentation for the reason behind the replacements
- // https://stackoverflow.com/a/75299820
- var path = mEntry.absolutePath()
Yeah, i dont really like that "solution" too, at least not without finding a better documentation for it.
Do you have any idea why the original "Default Filemanager" doesn't work in the emulator/aosp?
— Reply to this email directly, view it on GitHub https://github.com/IvanVolosyuk/diskusage/pull/93#discussion_r1450022825, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXQ6HMMMU3OSDRMHDXPDB3YODWWJAVCNFSM6AAAAABBWO2RFWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQMJXGYZTEMRXGI . You are receiving this because you commented.Message ID: @.***>
This pull request updates the way DocumentsUI parses the URI, so that the default filepicker works properly.
I have only tested this with a pixel 7 (api 34). I assume that my current aproach does not fix it for most people, since i partially hardcode the final path. I would like some help with fixing that issue.
The second improvement is that i remove the code to open a different filemanager from the view-function, into their own abstract class. This allows for easy and quick access to specific apps without cluttering the main function.