Open owlandfox opened 4 months ago
Hello,
Can you give me the logs https://developer.android.com/studio/debug/logcat?hl=en
Its not possible to get the logs as the only wayt to test if the midi controller is being detected is by plugging into the Quest. Which means it is not connected to the laptop via USB to activate Logcat :/
Unless theres another way? I also see in some of the other MIDI plugins we tried from the store they required us to add some parameters to the androidmanifest. Is this the case here too? If so what would we need to add?
You can have the logcat by using wifi instead of USB :
https://docs.unity3d.com/Packages/com.unity.mobile.android-logcat@0.1/manual/index.html
Would it help for me to filter it by some criterion?
Not really the full log is ok
2024/03/11 11:03:40.234 1072 5178 Warn InputManager-JNI Input channel object '499b7c7 com.oculus.os.vrusb/com.oculus.os.vrusb.UsbPermissionActivity (client)' was disposed without first being removed with the input manager!
2024/03/11 11:03:40.234 10860 10860 Info Unity Device Attached /dev/bus/usb/001/002
2024/03/11 11:03:40.234 10860 10860 Info Unity Midi.MidiEventHandler:DeviceAttached(String)
2024/03/11 11:03:40.234 10860 10860 Info Unity System.Reflection.RuntimeMethodInfo:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
2024/03/11 11:03:40.234 10860 10860 Info Unity UnityEngine.AndroidJavaProxy:Invoke(String, Object[])
2024/03/11 11:03:40.234 10860 10860 Info Unity UnityEngine.AndroidJavaProxy:Invoke(String, IntPtr)
2024/03/11 11:03:40.234 10860 10860 Info Unity UnityEngine._AndroidJNIHelper:InvokeJavaProxyMethod(AndroidJavaProxy, IntPtr, IntPtr)
You need to have the usb permissoin in the manifest file
Yes I had a feeling it was something extra needed in the manifest. Can you confirm what exactly needs adding as I did already add android.hardware.usb.host
Do we need to add the full snippet from here - https://developer.android.com/develop/connectivity/usb/host
<manifest ...>
<uses-sdk android:minSdkVersion="12" />
...
<application>
<activity ...>
...
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>
<meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
android:resource="@xml/device_filter" />
</activity>
</application>
Maybe <uses-feature android:name="android.hardware.usb.host" />
Did it work? Can I close the issue ? @owlandfox
Nope still trying to get some detection for plugged in controllers
From what I can see its because we also need to declare intent filters https://developer.android.com/develop/connectivity/usb/host
But im not sure where we would need to create the xml file as this seems very specific to Android file structure rather than Unity.
You need to have the android manifest file in unity : https://docs.unity3d.com/2023.2/Documentation/Manual/android-manifest.html
Add <uses-feature android:name="android.hardware.usb.host"/>
into the manifest file
Yep tried this multiple times, no success :/
App built for Quest 3 - When plugging my Midi controller in I get the prompt menu appear and click OK. Scene opens but the text does not display any device info or incoming midi data info.
Secondly once this is solved I am simply trying to connect the incoming midi messages to trigger buttons, sliders and toggles in the UI. Can you provide steps to do this also? Thanks!