Building an Android application with Augmented Reality support from the ConfigWise SDK AR Framework is achieved by the following steps. Simply followed them to get the sample application from Github built and running on your mobile device. This AR Framework makes working with the underlying Google AR Framework much simpler and faster to work with.
Software development pre-requisites:
Android Studio 4.x, (Windows/Mac/Linux OS)
SDK Manager, with SDK Platform 9.0 or newer and the latest NDK with build tools 30.x
AVD Manager, with a virtual machine on at least API 29 (Android 9 with Google play store)
Gradle 6.x build tools (they come via Android Studio)
A computer with minimum 8GB RAM and a intel core-i5 cpu.
A mobile device with minimum Android release Nougat 7.0.
First download the application’s example code from github.
Unzip the archive into your projects folder.
When unpacked open the Android Studio and select “open existing project”
Select the project's subfolder configwise-sdk-android-master where you just unzipped the github code you downloaded.
Upon parsing the configwise-sdk-android project files let Android Studio install all missing and update any outdated plugins/gradle components. Might take a minute or two.
Then restart Android Studio to take the plugins into use.
Open the example application Java file in this location: app/src/main/java/io/configwise/android/sdk_example/"myappplication.java"
You can see it needs a token instead of the “YOUR_COMPANY_AUTH_TOKEN” . This token enables the download of the AR objects stored in the ConfigWise backend system.
The token is generated in the CBO (ConfigWise Back Office) page.
We use here a single company-wide token since we don’t need single user logins.
You need an account to https://configwise.io to be able to update the 3D product catalog with the products you want to display in the AR application. The 3D objects are downloaded from the ConfigWise API as well as the application layout and child object structure.
Paste the token in the file and in Android Studio re-build the application.
Tip: if you notice some 10+ deprecation warnings appear in the controllers/BaseActivity.java code you need to update the NDK “side by side” and Build tools to the latest version that Android Studio suggest.
WARNING: Compatible side by side NDK version was not found. Default is 21.0.6113669.
Compatible side by side NDK version was not found. Default is 21.0.6113669.
Make sure you update all Android Studio build tools to latest 30.0 and install/upgrade the side-by-side NDK.
Menu tools > sdk manager > sdk tools > check NDK
and update the rest of the software via.
Menu Help > Check for Updates
When the build is passed you can deploy the freshly built ConfigWise SDK Example application onto a vritual started from the AVD manager or on a real mobile attached via a USB cable.
Alternatively you could compile the APK and copy the file app-debug.apk to your mobile via a weblink, google drive or email attachment.
When all previous steps went well you should have the application launched. The Virtual Machine is not capable of Augment Reality in the videocamera even if you have camera working on your laptop. It really need the Google Play Service for AR installed on a real device that is compatible.
The final end result of the running ConfigWise example application for Android looks like: