-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PSI on Oculus Quest (Android) #263
Comments
Hello, just a quick heads up that we are still looking into this. We have never tested Psi with an Android/Xamarin project, so we're not quite sure what is going wrong, but we'll ping this thread when we know more. |
I looked into this, and there appears to be an issue with the call to the |
Hey! Thanks for looking into it. I indeed came to the same conclusion about
var type = Type.GetType(typeName); and did the same to the I have to say I don't really know how the custom assembly resolver is different from the standard assembly resolution that is used when calling Anyway, when using this adapted version of PSI in a Xamarin Android project, calling the PsiTest() example from my first post runs as expected and timestamps are being printed to the console. Next, I tried playing back a store made on another device. I made a store on my PC using the code from https://github.com/microsoft/psi/wiki/Brief-Introduction#3-saving-data and copied it over to my phone. public async void PsiTest()
{
await Xamarin.Essentials.Permissions.RequestAsync<Xamarin.Essentials.Permissions.StorageRead>();
await Task.Run(() =>
{
try
{
using (var p = Pipeline.Create())
{
// Open the store
var store = PsiStore.Open(p, "demo", @"storage/emulated/0/Store");
// Open the Sequence stream
var sequence = store.OpenStream<double>("Sequence");
// Compute derived streams
var sin = sequence.Select(Math.Sin).Do(t => Console.WriteLine($"Sin: {t}"));
var cos = sequence.Select(Math.Cos);
// Run the pipeline
p.Run();
}
}
catch (Exception ex)
{
Console.WriteLine("Message: ");
Console.WriteLine(ex.Message);
Console.WriteLine("InnerException: ");
Console.WriteLine(ex.InnerException);
Console.WriteLine("StackTrace: ");
Console.WriteLine(ex.StackTrace);
Console.WriteLine("");
}
});
} This resulted in the following exception:
I fixed it by changing psi/Sources/Runtime/Microsoft.Psi/Persistence/InfiniteFileReader.cs Lines 31 to 33 in 419d35f
InfiniteFileWriter.PulseEventName(path, fileName);
this.writePulse = new Mutex(false); Again, I don't exactly know whether not using I'm currently stuck on the playing back of a different type of stream: This results in the following exception:
Looking into this, I found the following description above the lines that throw the exception
Something seems to go wrong when creating a delegate to IL code for the array (de)serializers, although I don't know how to circumvent this (by maybe sacrificing a bit of performance?) Any suggestions? |
Thanks for sharing your efforts on getting this to work! To answer your questions:
Hope this helps. |
Hi! I'm trying to use PSI on an Oculus Quest in combination with StereoKit.
To start, I cloned the StereoKit universal template (https://github.com/StereoKit/SKTemplate-Universal) and added a
Microsoft.Psi.Runtime
NuGet package reference to theStereoKitApp
project.I adapted the first example from the Brief Introduction wiki page and added it to
App.cs
to test the basic functionality.When running this on desktop by setting the
StereoKit_DotNet
project as the startup project it works as expected; every 100ms a timestamp is printed to the console.When setting the
StereoKit_Android
project as the startup project and deploying it to the Oculus Quest, the following exception is caught:I tried creating a new
Android App (Xamarin)
project in which I added the samePsiTest()
function and tried running it on my Android phone which resulted in the same error.I read on the Mixed Reality Overview wiki page that the Oculus Quest is not tested but that it should be possible to target it (with a little extra effort).
Could you point me in the right direction on how to get this to work? Thanks in advance!
The text was updated successfully, but these errors were encountered: