Reputation: 877
We are thinking to port our Android 3D games to support google cardboard VR. Our games are native android apps and are based on NativeActivity. The CardboardActivity is a java activity so that can not be used in native app. I opened the Cardboard library (.arr) and saw some native libraries, but there is no any docs or guideline about how to make native android app with cardboard API. Anyone could provide some info or suggestions? Thanks.
Upvotes: 1
Views: 450
Reputation: 1286
Your current best bet it to use a CardboardView, and call your native renderer via JNI in CardboardView.Renderer's onDrawFrame() method. https://developers.google.com/cardboard/android/latest/reference/com/google/vrtoolkit/cardboard/CardboardView.Renderer
That would probably require some refactoring of your app, though.
Upvotes: 1