What I am attempting to do is this: My smartphone sends its orientation (fusion of Gyro, Accel and Magnetic) to the controller which further processes the data to make it accessible by SteamVr which in turn should send me the frames which I want to send back to my smartphone.
What I achieved so far: I implemented a basic android-program which already captures its orientation, packs it into an UDP-Datagram and sends it to a given IP-adress.
I wrote a small Java program to verify its functionality and it already works.
Now I want to head to step 2: give this data to SteamVr. Right now I don't care for streaming back the video to android.
Assuming I would like to use a higher language like C# or Java, could someone provide me some help? Could I use OpenVr for that? And if yes, how? (This is not that well documented).
Edit:
I have a temporary solution. I'll use FreePie to send orientation to OpenTrack via UDP (I have modified FreePie.apk to smooth out the result a bit more). OpenTrack sends this via UDP to localhost.
I have to modify SteamVr to use a Null-Driver in order to accept a non existant HMD.
HeadTracking and Stream via Moonlight works great but now there is another Problem: As SteamVR starts a FullScreen HMD-Display-Window I can't use usual Input for any games.
Games usually start up in a separate window which accepts the Input while the HMD displays the VR-Experience. Now, the VR-Window has a big Problem. When not in focus, it neither displays nor takes Input from OpenTrack. This means No Video, No Headtracking. Some games start themselves in VR mode so I could use this window to get KeyboardInput AND Video, but Headtracking is disabled then, as stated before.
So in short: - FreePie -> OpenTrack -> SteamVR NULL-Driver - Moonlight -> Android Works for everything that don't need input
ONLY SOLUTION here is: 2nd Display. -Set 2nd Display as Main. -Move everything to the 2nd extended Display - start steamVR (which will open in 2nd Display), - start the game. Now when focus is switched to VR-Window it suddenly appears at the PCs primary plugged in display (only tested it with Laptop + TV). So Moonlight will capture Video while 2nd (current Main) Screen focus on GameWindow to capture Input.
My new question is: How to work around the need for a 2nd Display?