Using the android.hardware.usb package, I have successfully detected the mounted memory drive and have given permission to the user, found a valid UsbInterface and created a UsbDeviceConnection.
I'm not sure where to go from here.
What I would like to do is possibly mount the USB filesystem or the internal memory to sync files generated using the application onto the USB memory drive, so from /sdcard/FOLDER/data/ to the thumb stick. A great example would be how ES File Manager detects the USB memory drive and mounts it in someway, allowing for both read and write access.
I've looked into using libusb, android.mtp.MtpDevice, using mount point /storage/usbdrive, reading /proc/mounts for more information, etc. Nothing seems to work at this point.
From what I've seen on SO and the internet, it isn't widely documented or known how these file manager programs are able to utilize the Android Usb package and mount (and/or) access USB filesystems.
Any help or a step in the right direction would be fantastic.
Details:
Running on NVIDIA Shield Tablet (2014), KitKat 4.4
No root access, unable to root device
SDK->Java and NDK->C are both fine
USB OTG cable is being used; cable works fine as I'm able to mount and use external camera with it