Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Virtual Reality with Google Cardboard @ GDG Dnipro meetup

Virtual Reality with Google Cardboard @ GDG Dnipro meetup

First look on Google Cardboard after Google I/O 2014 as an instrument to create Virtual Reality applications for Android.

Kseniia Shumelchyk

July 25, 2014
Tweet

More Decks by Kseniia Shumelchyk

Other Decks in Technology

Transcript

  1. Cardboard guides • Earth: Fly where your fancy takes you

    on Google Earth. • Tour Guide: Visit Versailles with a local guide. • YouTube: Watch popular YouTube videos on a massive screen. • Exhibit: Examine cultural artifacts from every angle. • Photo Sphere: Look around the photo spheres you've captured. • Street Vue: Drive through Paris on a summer day. • Windy Day: Follow the story (and the hat) in this interactive animated short from Spotlight Stories.
  2. Virtual Reality (VR) Toolkit https://developers.google.com/cardboard/ • Tutorial: Get started with

    the API. • Android Demo App. • Download: VR Toolkit .jar file. • Exhibit: Examine cultural artifacts from every angle. • Use: VR Toolkit API.
  3. VR Toolkit main features • Cardboard Activity CardboardActivity is the

    starting point for coding a cardboard app. CardboardActivity is the base activity that provides easy integration with Cardboard devices. It exposes events to interact with Cardboards and handles many of the details commonly required when creating an activity for VR rendering. Note that CardboardActivity uses sticky immersive mode, in which the system UI is hidden, and the content takes up the whole screen. This is a requirement for a VR app, since CardboardView will only render when the activity is in fullscreen mode. • Get the CardboardView All user interface elements in an Android app are built using views. The VR Toolkit provides its own view, CardboardView, which is a convenience extension of GLSurfaceView that can be used for VR rendering. CardboardView renders content in stereo. You initialize your CardboardView in your activity's onCreate() method CardboardView.StereoRenderer includes these key methods: • onNewFrame(), called every time that app renders. • onDrawEye(), called for each eye with different eye parameters.
  4. VR Toolkit and Cardboard hardware • Listen for magnet pulls

    Magnets are used to create a push button. When you push the magnet, the magnetic field changes and is detected by the magnetometer of your phone. This behavior is provided by the parent activity (CardboardActivity) implementation of the MagnetSensor.OnCardboardTriggerListener interface. • Customize NFC behavior An NFC tag. When you insert a device that has the Android app on it into the Cardboard device, NFC triggers the launch of the app. This behavior is provided by the parent activity (CardboardActivity) implementation of theNfcSensor.OnCardboardNfcListener interface.