Hongkun Wang
Hongkun Wang

Reputation: 877

Is that possible to use google cardboard API to create native Android application?

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

Answers (1)

dcoz
dcoz

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

Related Questions