How to connect a USB CDC device

Give us as much detail as possible regarding the issue you're experiencing.

ML2 OS version: 1.5
MLSDK version: 1.5
Host OS: Windows

I need to connect a USB CDC device that streams data to the Magic Leap 2. I know this can be done using Android in Java but I need to integrate it with a Native C++ application. Can this be written in Java and then integrated using the JNI interface?

To connect your USB CDC device to a C++ Android app, you'll need a two-pronged approach. First, use Java and the Android USB API to manage device detection, permissions, and the raw data exchange. Define native methods in Java that will "bridge" the connection to your C++ code. This is where you'll implement data processing and the integration with your core C++ application logic.