Android build toolchain

Introduction

This page outlines what is required to build a Scapi plugin to be installed and run with Trimble Access on an Android device.

Installation

This guide assumes you already have Trimble Access and the Scapi SDK installed, along with Microsoft Visual Studio 2022 (or 2019). If not, please see Setting up the development environment. Getting your plugin working with Windows is a good way to streamline setting up for Android.

Install The Android SDK

The version of the Android Native Development Kit (NDK) is required for installation. Look on the Scapi Home page for a table listing the NDK version required for each release of Trimble Access. You can install multiple versions.

Obtain the sdkmanager by downloading the latest SDK command line tools from this web page (about 3/4 of the way down the page under the heading Command line tools only) and unzipping the file.

Then run the following commands, substituting the italicised parts for the version required.

sdkmanager "ndk;26.1.10909125"

sdkmanager "platforms;android-29"

Next, in the plugin project, edit PropertySheets\AndroidEnv.props and set the PropertyGroup to something like the following, but substitute the paths for the correct ones for your installation of the Android SDK and NDK.  

  <PropertyGroup Label="UserMacros">

    <ANDROID_SDK_ROOT Condition="'$(ANDROID_SDK_ROOT)'==''">C:\AndroidSDK</ANDROID_SDK_ROOT>

    <ANDROID_NDK_ROOT Condition="'$(ANDROID_NDK_ROOT)'==''">C:\AndroidSDK\ndk\21.3.6528147</ANDROID_NDK_ROOT>