Apertus
  • Documentation
  • Introduction
    • Definitions
      • Coordinate systems
      • Primitives
    • Features
      • Basic
        • Nodes
        • Light sources
        • Geometries
        • Primitives
        • Texts
      • Environment simulation
        • Water
        • Sky
        • Terrain
      • Browser
      • UI technologies
        • HTML UI
        • Presentation
        • Gallery
      • PointCloud
      • 360
        • 360 Images
        • 360 Videos
      • 3D Model Formats
      • Scene Sharing
        • Multiplayer
      • Video and Voice Chat
      • Hand Tarcking
        • Leap Motion
      • Head Tracking
        • Fob
      • Displays
        • Multi Display
        • Cave System
        • HMDs
      • Industry
        • IoT, and Sensors
        • Robot monitoring
        • Robot calibration
  • Developers
    • Development Cycle
    • Architecture
      • Project folders
      • Configuration ecosystem
    • API
      • C++ API
      • JavaScript API
      • HTTP REST API
    • Getting Started
      • Creating a plugin
      • Creating a sample
  • Contribute
    • Report a Bug
    • Suggest a Feature
  • Tutorial - How to visualize CAD models in VR
    • Introduction
    • Import CAD Models
    • Convert CAD Models
    • Create Low-poly from CAD Models
    • Create Photorealistic CAD Models
  • Plugins - Photorealistic Render
  • Plugins - Physics
  • Tutorial - How to visualize Tensorflow training in VR
  • Tutorial - Virtual Learning Factory Toolkit Gamification
  • Overview
    • Introduction
    • Architecture
    • Use Cases
  • Installation
    • Windows
    • Android
      • How to use
      • Writing an application
    • MacOS
  • Build
    • Windows
      • How to build the source on Windows
    • Android
    • MacOS
  • Plugins on Windows
    • Photorealistic Render
      • How to use
      • How to configure
      • Features
      • Sample
    • Physics
      • How to use
      • How to configure
      • Features
      • Samples
      • Demo video
  • Plugins on Android
    • Java Native Interface
      • How to use
      • Extending the API
    • Filament render
      • How to use
      • How to configure
      • Developers
  • Plugins on MacOS
    • Untitled
  • Samples on Windows
    • Deep learning
      • Untitled
      • Use the Fastai-PythorchVR Sample
      • Use the HTTP API
      • Create HTTP Requests from Python
      • Demo video
    • Virtual Learning Factory Toolkit Gamification
      • Installation
      • Lobby - User Interface
      • Local - User Interface
      • Student - User Interface
      • Teacher - User Interface
      • VLFT Gamification Session
      • VR Mode
  • Virtual Learning Factory Application
    • Installation on Windows
    • Installation on Apple
    • Lobby
    • Single Player
    • Multi Player - Student
    • Multi Player - Teacher
Powered by GitBook
On this page
  • Requirements
  • Configuring Android Studio
  • Android SDK
  • Android NDK
  • Debug configurations
  • Sample app
  1. Installation

Android

In this section we will discuss how you can use ApertusVR's main features from Android and Java, the installations process and the developement of applications.

PreviousWindowsNextHow to use

Last updated 4 years ago

Requirements

  • v. 3.6 or later versions (any other tools related with Android Studio will be discussed in the Configuring Android Studio section)

  • for Windows

  • we recommend the latest build (but if you want an earlier one, you must chose one that contains the android libraries

Configuring Android Studio

For Android Studio to work properly, you will need the following toolsets:

  1. Android SDK

  2. Android NDK

Android SDK

ApertusVR supports Android 6.0 (Marshmallow) or higher versions. In correlation with this, the library works with API level 23, or later releases. This implies, that according to the , the minimum requirement is:

  • Android SDK Platform-tools r23

  • Android SDK Tools 24.3.4

If Android Studio does not find any of the Android SDK versions, it will offer you to download the latest release. This may not be the version you want (e.g. your debugging Anroid device only supports former versions), so you can also download other releases in Settings > System Settings > Android SDK > SDK Tools.

Android NDK

Then click Apply, and wait until the install finishes.

Debug configurations

The fact, that we changed the default build directory implies, that Android Studio's debugger won't find our native libraries, thus we can not debug native code, if we don't tell the debugger, where it can find them.

So first open Android Studio, and go File > Open, then navigate to the project folder C:\ApertusVR\plugins\scene\androidSampleScene, and click on androidsample then click Ok to open the project file. When it is opened, it may takes some time for Android Studio to configure the project. If it is done, open the left panel called 1:Project:

Assume that you didn't changed the buildDir variable in the project's build.gradle file, so your build directory is at C:\ApertusVR\build\android. Now if you successfully built the project, then you should have directories there like: C:\ApertusVR\build\android\ApertusVR\apertusvr\intermediates\cmake\debug\obj\<abi>. Where <abi> is one of the three supported ABIs (arm64-v8a, armeabi-v7a, x86). In those folders there are several *.so files. To be able to debug native code, we will tell Android Studio, that it can find these libraries there to fill its symbol table for debugging.

To do this, go Run > Edit Configurations > Debugger. Then here, we should fill in the Symbol Directories field. Click on the + button in the top right corner, like you see on the image:

Then navigate to the directories we just discovered in a few lines above. Then add all the ABI named folders:

If you did it right, then you should see something like this:

Now everything is set up, you can start programming and debugging your app!

Sample app

First you need to open the project in android studio and go File > Open, then navigate to the project:

There are 2 options:

  • C:\ApertusVR\plugins\virtualLearningFactory\android

  • C:\ApertusVR\plugins\scene\androidSampleScene\androidsample

In the first you can choose a room to connect to. In the second it automatically loads in a scene.

For running both basic sample appa, you have to copy their resources to your Android device. The basic sample apps use the models available in the ApertusVR/sample/virtualLearningFactoryToolkit/models folder.

After you connected your debug Android device, open the Device Explorer in the left right corner.

Then copy the model files to data/data/org.apertusvr.app/files:

If you did everything right, you can start the sample app by clicking Run > Run 'app'. Then after installing, you should see something similar to the picture presented here:

The ApertusVR library is written in C++, which means, in order to build on Android, we use the native language toolset provided by Google, called Android NDK (native developement kit). For more information see the official .

The version we use is 21.0.611369. You can download it with Android Studio's . Go Settings > Appearance & Behavior > System Settings > Android SDK > SDK Tools. Then click Show Package Details in the bottom right corner. Choose NDK (Side by side) 20.0.5594570 or 21.0.611369, but do not click on Apply yet.

ApertusVR uses as its main build tool. Good news is that Android Studio accidentally has support for CMake projects too. In order to use it, on the same page where you picked the NDK version, you can mark the appropriate CMake version, which is 3.10.2.

Android Studio
Git
ApertusVR
SDK Platform release notes
Android NDK documentation
SDK Manager
CMake
NDK and CMake in the Android SDK manager.