
We do, however, intend to remove NativeActivity in the future.
#GOOGLE VR ANDROID STUDIO DOWNLOAD CODE#
This approach works great, and we can reuse the existing code for native rendering. We found a more elegant solution by releasing the seized window and injecting a custom SurfaceView with its render callbacks redirected to the abstract implementation in NativeActivity: The PopupWindow hack may work for simple views like an Google AdMob banner but causes complications with a complex VR view. The Daydream SDK requires a GvrLayout view in the Activity’s view hierarchy in order to show the VR Scene, so things didn’t work out.Ī research about this issue shows that most people decide to get rid of NativeActivity or bypass this limitation using hacky PopupWindow modal views.
#GOOGLE VR ANDROID STUDIO DOWNLOAD ANDROID#
We realized that NativeActivity ignores the Android view hierarchy because it’s designed to take over the surface from the window to directly draw to it. Servo uses a NativeActivity, in combination with android-rs-glue and glutin, as an entry point for the application. To manage the different scenarios we worked on proper implementations of native EGL context lost and restore, animation loop pause/resume, immersive full-screen mode, and support for surface-size and orientation changes. VR Application life cycleĭaydream VR applications have to gracefully handle several VR Entry flows such as transitions between the foreground and background, showing and hiding the Daydream pairing screen, and adding the GvrLayout Android View on top of the view hierarchy. It’s nice that our WebVR support goals has allowed to push forward some improvements that are also useful for other areas of the Android version of Servo. We have contributed to many parts in the Servo browser codebase in order to allow polished WebVR experiences on Android. Put on the headset, switch on your controller, and run the app from Daydream Home or from a direct launch. If you are eager to explore, you can download an experimental three.js Rollercoaster Demo (Android APK) compatible with Daydream-ready Android phones.


The current implementation is WebVR 1.1 spec-compliant and supports asynchronous reprojection to achieve low-latency rendering. We are happy to announce that Google Daydream VR headset and Gamepad support are landing in Servo. Want to try this now? Download this three.js Rollercoaster Demo (Android APK)! WebVR Google Daydream support lands in Servo Imanol Fernandez - 19 April 2017
