I'm currently working on a gallery application that enables users to choose images from their phone and transfer them to a kiosk. Upon loading the application, it searches the entire device for folders containing images and organizes them into an album object. By default, I have configured the scan to exclude hidden directories (with names starting with a period), but I've noticed that it also scans system directories such as Android and other application folders which considerably slows down the process.
Is there a way to ignore specific folders using a flag? Or should I manually adjust the scan to exclude the "android" directory despite potentially generating inaccurate results? Another option is to only scan well-known locations, but I am hesitant about limiting users' choices.
Any insights or suggestions would be greatly appreciated! Thank you.