如何从伪装成麦克风的 USB 加速度传感器获取数据?

How do I get Data from a USB acceleration sensor that pretends to be a Mircophone?

这是我的第一个应用程序,我正在尝试从传感器获取数据。
传感器是 Digiducer,根据他们的网站,它使用通用 USB 音频驱动程序。

No drivers or DLL’s required! USB Audio drivers are standard in most operating systems (iOS, Windows, MacOS, Android) LINK

我已经阅读了 USB Digital Audio Article,它说如果设备符合 class 标准(它声称是),我不需要安装任何特定的驱动程序。

The term driverless is a common synonym for class compliant, indicating that it is possible to use the standard features of such a peripheral without requiring an operating-system specific driver to be installed. LINK

我检查了章节 Android support for USB audio class 中提到的所有条件,传感器与它们完美匹配

Android 5.0 (API level 21) and above supports a subset of USB audio class 1 (UAC1) features:
- The Android device must act as host
- The audio format must be PCM (interface type I)
- The bit depth must be 16-bits, 24-bits, or 32-bits where 24 bits of useful audio data are left-justified within the most significant bits of the 32-bit word
- The sample rate must be either 48, 44.1, 32, 24, 22.05, 16, 12, 11.025, or 8 kHz
- The channel count must be 1 (mono) or 2 (stereo)

我不明白我必须做什么才能从我的传感器获取数据。

我自己想出来的。 其实我什么都不用做。
我只需要调用 AudioManager 并在输入设备中搜索设备名称

    AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
    AudioDeviceInfo[] adiArray = am.getDevices(1); // INPUT_DEVICES = 1

    for (AudioDeviceInfo deviceInfo : adiArray) {
        String name = deviceInfo.getProductName().toString().toLowerCase();
        if (name.contains("33d01")) {
            externalMic = deviceInfo;
            break;
        }
    }