Jump to content

[native] black screen with net-android


CaNiTaR

Recommended Posts

Hello,

I'm trying to use the NativeSDK in a C# Android app with .NET 7.0. I created a default android app, put these libraries in the project directory:

  1. wvr.common.client-3.2.0.aar
  2. wvr.common.core-3.2.0.aar
  3. wvr.common.flatbuffers-3.2.0.aar
  4. wvr.common.overlay-3.2.0.aar
  5. wvr.common.sdk-3.2.0.aar
  6. wvr_client-3.2.0.aar

so these libraries are automatically binded to my application. Then I added these libraries from NuGet (package manager):

  1. Xamarin.Kotlin.StdLib.Jdk7

because `wvr` libraries require it.

 

C# itself can be used as a native language, so I use it instead of both Java and C/C++. I wrote bindings to libwvr_api.so (WVRBindings.cs) and libGLESv3.so (GLESBindings.cs) and call these methods as if I was writing C/C++ code.
All logic is written in accordance with the official HelloVR examplea and NativeSDK tutorial and is contained in the MainActivity, VRInitializer, VRApp and FrameBufferObject classes.

But when I launch the app, I get the Vive logo followed by a black screen. What could I have done wrong? I've been trying to fix this for 5 weeks now…

Thanks for your help

FrameBufferObject.cs MainActivity.cs VRApp.cs VRInitializer.cs

Edited by CaNiTaR
Link to comment
Share on other sites

@CaNiTaRHey, can you link the whole project? And a logcat output?

The libraries in gradle/android studio link those libraries using their dependencies as well. These link errors are not infrequent when trying to convert top-level dependencies (that then get other libraries pulled into) into "flat" dependencies

In addition, the android manifest needs to be set up to call the correct code when the apk loads

Thanks,
Alex
 

Link to comment
Share on other sites

Link to the project repository: https://github.com/KirillAldashkin/NativeWaveDotNet

This project can be built on Windows or Mac OS (temporary limitation of .NET Android) after installing the .NET 7 SDK (link) and the "android" workload (using "dotnet workload install android" console command) in Visual Studio 2022 (link).

When I run the project, I get the following output - debug_output.txt. I killed the program by stopping debugging, because while the application is running, any buttons on the controller are ignored, and I cannot close it in the usual way. The code itself is a mixture of tutorial and "HelloVR" example. There may be very few comments, as this is just a barebones application. If something is not clear, feel free to ask, but I won't be able to test the code until in mid-January (because I won't have access to school during the holidays).

Thanks,
Kirill

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...