Xense AR VPS Integration Guide for Android Native App
This document describes how to integrate Xense AR to use the VPS (Visual Positioning System) service in an Android native application.
Download Template Project
Download the Android template project:
https://s3.educationxr.vn/ar-world/SDK/Android/xensearsdk.zip
Import Required Libraries
Navigate to the libs directory of the template project and copy the required files into the libs folder of your integration project (create the folder if it does not exist).

Project Configuration
On the integration project, apply the following changes:
Update settings.gradle
Add the required script to settings.gradle:

Update build.gradle
Add the required script to build.gradle:

Update strings.xml
Add the required values to strings.xml:

Sync Gradle
Sync the project with Gradle files to apply all configurations.
⚠️ Warning
Ensure there are no Gradle dependency conflicts before proceeding.
Create Communication Activity
Create a new Activity that extends CommunicationActivity, then declare it in AndroidManifest.xml.

Send Messages to Unity
Initialize Communication Object
Declare the object used to communicate with Unity:

Send Command to Unity
Send messages using the SendCommandString function.
To open the UI provided by Xense, send a message with the following type:
updateHomeScreenUrl
ℹ️ Info
All message payloads must follow the JSON structure defined by Xense.
Download Versions
Version 1.0.0
https://s3.educationxr.vn/ar-world/SDK/Android/xensearsdk_1.0.0.zip
Version 1.0.1
https://s3.educationxr.vn/ar-world/SDK/Android/xensearsdk_1.0.1.zip