Listview works for mp3,jpg and pdf not html

When I use these blocks with the appropriate boxes changed for mp3,jpg and pdf file extension, I get a list of each of those different files.

When I use this with the same changes made for html, I get an empty list.

Can anyone explain this?

Try this one:

It's the device, Samsung Galaxy Tab A. File setting only has 2 choices. Show media or none. listFiles as well as my earlier one work on an old Kyrocera phone. Any way around that? Is it a common problem/setting?
Also works on wife's cheap ONN tablet.
Why do these company's think they need to protect me from doing things?

Just thinking on this a bit. I can use those files from their location I just can't make a list of them. Can I make a list to pick from that doesn't use the extension and still have it work when called on? I haven't quite figured out how to do that.

Sorry but I don't understand where the problem is. Will my APK work and list HTML files?
If not, take a screenshot and post.

It works on two devices and not the one I was originally trying to use. On further investigation, that device seems to have a restriction on files that I can't change. Here are screenshots of two different apps on that device.

Would it work to have listpicker only show the file as website not website.html?
Like this

Ideally it would only look in the folder named /website/ on the external storage card

Or, since the setting seems to be app related.

Is it somehow possible to have the app tell the device to allow access to all files? This would be easier to implement across more devices.

Yes, with my extension:

On which devices & Android version does it work and on which not?

It works on three devices two are Android 10 one is Android 7. It doesn't work on the Android 11

Yes, on Android 11+ you cannot access non-media files, that are not created by the app itself (without MANAGE_EXTERNAL_STORAGE permission).

Try this one (and grant → All files access):

Note: If you haven't uninstalled my app (listFiles.apk) yet, do that first and then install the new one.

Yes, that works. :blush:
Any chance for the aia of that so I can see how you did it? I looked at the tutorial. I have downloaded the aix file. I'm always confused on how to actually get the examples incorporated into what I want to actually happen.

This is all you need:

2 Likes

Thank you :smiling_face_with_three_hearts:

Thanks again. After much testing with different file extensions I got things worked out in the app I have been working on. It works with html and even some dummy fake file extensions.
I did find that after installing the app it if I open it from the popup screen it didn't show all the files but, after closing and opening from the app list it works correctly.

What do you mean with "popup screen"?
Show your blocks, screenshots ...

This is the screen that appears after I install any apk.


If I open it from here after going through the process of allowing app to read all files it still shows nothing until I close the app and reopen. After that it works every time as it should. I assume it's because I'm calling for things to happen after screen initialize and because it has already initialized I have to do it again.
It's not a problem, I just had to figure out how thing work.

first try to get the permission... and after having received the permision, then get the list of files
Taifun

1 Like

Not sure I did that right but, it didn't change anything. I made a work around and I think looks and works even better by putting a clickable image on start.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.