Hentoid icon indicating copy to clipboard operation
Hentoid copied to clipboard

Issue with Shortcut to Open the Library

Open locuturus opened this issue 2 years ago • 4 comments

Hentoid Version: v1.18.0 (657)

Device/Android Version: Xperia 5 iii / A13

Issue details / Repro steps: Settings > Storage > Storage management > 3dot > Open folder

Stack trace / LogCat: There is no error message. If my library is in public device storage then this shortcut works. But if I store the library inside a content provider, for example Anemo on GitHub by 2bllw8, then the intent created by that shortcut fails to open Anemo's content provider and DocumentsUI fails back to opening the default Downloads content provider.

The intent: Screenshot_20230727-210139

I'm not following the logic for the repeated folder path at the end of the data string but no matter, I haven't found a way to adjust the parameters to make this work. The Anemo app itself can open it's own content provider root in DocumentsUI but I can't intercept the intent it's using to do it.

It should open the .hentoid folder within this content provider: 4r7g517k2h9ys1wy

By the way other content providers like Termux's also fail to open with this style of intent. It works well for content://com.android.externalstorage paths, but not content://3rd.party.app paths. I don't know why, but I'm hoping you all can figure it out!

Regards.

@AVnetWS/admin-team

locuturus avatar Jul 28 '23 04:07 locuturus

To be perfectly honest, the app hasn't been tested on such scenarios. As you guessed, the key lies in how the Intent is formed...

I'll try and reproduce that on my own and see how it goes.

RobbWatershed avatar Aug 08 '23 08:08 RobbWatershed

@locuturus I've just taken a look at Anemo, which hasn't been updated for one entire year. Is that issue still worth investigating?

RobbWatershed avatar May 11 '24 15:05 RobbWatershed

Anemo is not a feature rich app, it could easily go for a while without needing attention. But even if it is abandoned the larger problem is building an intent that can open a 3rd party content provider.

Several of Android's own content providers can be opened via intents, but none of those have a regular file structure so opening their root is the best I can do with Images, Videos, Audio, Documents, Downloads. But some providers, like Anemo, do use an internal file structure that is apparent in the intent created when opening some file within the provider.

Because Anemo is open source I hoped you could learn how it works and see if it can be done with an intent at all — or if it can only be done with some method Hentoid can't reasonably implement.

locuturus avatar May 11 '24 16:05 locuturus

Alright. Thanks for your feedback. Let's get to it, then :)

RobbWatershed avatar May 12 '24 10:05 RobbWatershed