VR SDK for Android 0.1.1 ARM Developer Center
Getting Started Guide

Everything you need to know to go from scratch to building Android applications.

Introduction

This guide helps you get up and running with developing for your Mali GPU based platform running Android. It helps you to download and configure the tools so you can begin to develop apps for your platform. The guide will then talk you through importing a basic Android project, building it and then running the project on a your target platform. It is assumed you are either running Linux or Windows as your host platform.

Getting the Appropriate Tools

You require a few tools for Android Development of which are modules which you can install via Android Studio. Download Android Studio from here.

Once you have installed Android Studio, you will need to install the Android NDK to support any native code.

  1. Open Android Studio. If a project opens up, go to Tools -> Android -> SDK Manager. If you are shown the welcome screen click on Configure -> SDK Manager located at the bottom-right.
  2. In the Android SDK window, click the SDK Tools tab.
  3. Check the boxes next to LLDB, CMake, and NDK.
  4. Click Apply, and then click OK.
  5. When the installation is complete, click Finish, and then click OK.

Full documentation and instructions on the Android NDK here.

Previously you would have to setup and configure Eclipse with ADT, however the ADT plugin has been discontinued and will no longer be supported. Android now packages everything you need within Android Studio for you, making getting started much more easy.

Connecting your Device

To put your application onto a real device you must install drivers. For this guide we use the Allwinner A13 tablet which use the default Android USB Drivers. If you are using a different device consult the manufacturer to find out what drivers you need to install. You must also turn on USB debugging on your device for this to work. Do this by:

  1. Open Settings and then Developer Options.
  2. Activate the USB debugging option.

Import and build a sample project

To test if your setup is ready for developing real applications, try one of the sample applications provided by us:

  1. Open Android Studio the same way as done previously and click Open an exisiting Android Studio project.
  2. Navigate to where you installed the VR SDK, and go to the samples/SimpleVR subdirectory.
  3. Double click on SimpleVR.
  4. Gradle should sync automatically, but if it doesn't then go to Build -> Make Project.
  5. Then click Run -> Run 'app', and choose to run it either on a connected USB android device, or an emulator.
  6. If you've done everything right so far, you should see a screen like this:
  7. You can now make changes to the code in the Project view.