USB OTG support

A USB OTG adapter provides a very convenient means to add storage to an Android phone.
Once plugged to the phone's micro-USB connector, one can connect a USB stick with music to the other end.
However, it seems that foobar2000 can't see the connected stick.

It is possible to use it, though, but in a very crude way: using a file explorer (e.g. ES File Explorer) it's possible to navigate to the device, open the required folders until one reaches the music files; after that, clicking on the file it's possible to open it with foobar2000.
However...
- it's necessary to select and click each file in order to play it (no lists);
- obviously, files on the stick do not appear in the library.

There's really no support to USB OTG (or maybe my device is not compatible)?
Would it be possible to add support to USB OTG?

Re: USB OTG support

With Android, you should be able to add USB stick music folders to your library just fine. If you can't, please state details: foobar2000 version, Android system version and full device name.

With Windows Phone, not tested but I don't see why it wouldn't work. Will test before the next update.

foobar2000 version: 1.0.79 lite
Android system version: 7.0
Phone: Motorola Moto G 5
OTG Adapter has no name in it. Android System reports the stick's brand (SanDisk USB drive). ES File Explorer shows it as either USB1003 or USB1004 or USB1005 (changes each time the stick is plugged).

Re: USB OTG support

Update
Tried another OTG adapter, but foobar2000 doesn't see it either.
Looked for a folder in Internal Storage; there are only the usual ones.
As with the other adapter, it's possible to navigate to the folders in the USB stick and play the files one by one.

Re: USB OTG support

New update
As I said before, I can play each file, one by one, after navigating to them with with ES File Explorer.
Tried another way:
Clicked on the USB icon; a new screen opened whose title is the USB stick's Windows label. Clicked on the music folder, then on a file - three options were offered to me:
- BubbleUPnP;
- foobar2000;
- Google Play Music.
Was able to play with BubbleUPnP and Google Play Music but not with foobar2000!
Note that if I reach the files with ES File Explorer I'm able to play them with foobar2000.

Re: USB OTG support

I presume you've turned modern folder picker off in advanced settings.

As with new Android versions, it appears to be entirely impossible to talk to external USB storage using 'classic' POSIX programming interfaces. The devices do not appear anywhere under /storage, /mnt, whatever, hence foobar2000's own folder picker doesn't see them. I sincerely hope I that am wrong here and there's some obvious way around this; if you know better, please do tell me and I'll amend foobar2000 code to deal with this properly.

The current solution for reading music from USB storage is to use the modern folder picker to add USB storage folders, and have all file access routed through Android's DocumentFile Java classes. However, this makes music indexing insanely slow, that's why people have been avoiding the modern folder picker. Again if you've heard of a better programming solution, please do tell me.

Re: USB OTG support

I had left Advanced Settings in their default settings.
Checked and saw that Use old folder picker was really off.
Changed setting to on but foobar2000 still couldn't see the USB stick.
(Just in case, tried different combinations of sticks and adapters).

Note that I'm looking under Internal Storage and foobar2000 music folder, since these are the only file browsing options available; am I wrong about this?