Android Question SMM adapting sample code

Hi guys.
I am pretty new to B4x and consider myself rather inexperienced.
I stumbled over the sample code 2 of SMM and I thought it quite interesting and so I started adapting it for a new project.
Well, as it turned out it wasn't as easy as I thought...
1) How can I determine the number of files (images - png, bmp, jpg, gif) in a given folder when the number of images is unknown? In the she sample code the number of images is set 600.
2) How can I customize the address for this folder? I tried this but no images show up:

MediaManager.SetMedia(pnl.GetView(x).GetView(0), $"https://www.hundeschule-lampertheim.de/images/*.*"$)

Maybe there is someone here in this forum that can provide some additional information on how to make the changes so the code works.
Thanks
 
Solution
thanks again.
Well, in this case I completely misunderstood the sample code. I thought that's exactly what it does, listing images in a given folder of a web page. So it appeared to me anyways.
Hi and thanks for the reply.
Well, the images are all located on a web page, in a sub folder of the main page:
webpage:
www.hundeschule-lampertheim.de
subfolder :
/images

My goal is to get all of them shown like in the smm example-code.
The number of images in the subfolder may vary and they are of different types like jpg, png, gif etc...

Using the smm example code, I thought that changing the web address would do the trick, but unfortunately that didn't work
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
This question isn't really about SMM. There is no standard way to list web server files. Most web servers actually hide their internal files.
If you have FTP access then you can use FTP.List to get the list of images.

In this case the standard "apache listing" is disabled: https://www.hundeschule-lampertheim.de/images/
 
Upvote 0
thanks again.
Well, in this case I completely misunderstood the sample code. I thought that's exactly what it does, listing images in a given folder of a web page. So it appeared to me anyways.
 
Upvote 0
Solution
Top