Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
theaceofthespade's avatar
theaceofthespade
Honored Guest
3 years ago

Android Activities and the OpenXR SDK

when running the hello_xr example, if I even so much as add a java file (specifically an empty activity) I can no longer run the example.  I'm fairly early into investigating the issue here, but I figured I would check and see if anyone had success mixing standard android development with the OpenXR sdk.  We have some existing java code we would like to reuse and have had absolutely no success whatsoever adding openxr to an existing project, or vice-versa. Any guidance would be appreciated. 

1 Reply

  • We did that and it worked. It involved having a separate cmake and app project in Android Studio though, besides the hello_xr one. I didn't set it up myself but you can look at other projects that mix JNI / C++ with NativeActivity. I'm unfortunately not at liberty to share any code to help you out further.

    Without the java code you can't even add permissions for eye tracking or face tracking on Quest Pro. I will be trying to do so in my hello_xr branch eventually but I refunded my Quest Pro already so my motivation to work on that is nil. Meta hasn't given me any support on using Pro on PC side so I'm not exactly thrilled with their entire approach to customer support here. All they care about is Unity these days, really. Anyone who's trying to code stuff directly in C++ gets a "new phone, who dis" type response.