ArborXR Public Device API

How to use our public device API

The public SDK facilitates communication between the ArborXR client app and processes running on the same device. Native applications can integrate directly with our ISdkService.aidl interface. Unity applications integrate our SdkBehaviour class (see “Example Unity Script” below).

Setup

  • If you are using Unity 2019.x or lower
  • Download the Unity Package here
  • Adding package to a Unity project
    1. While in a Unity Project, open Window > Package Manager
    2. From the add package button + (top left), select add package from disk
    3. Navigate to and select the package.json file, and open

API Definition

  • getDeviceId()

    • Return Type: string
    • Description: UUID assigned to device by ArborXR
  • getDeviceTitle()

    • Return Type: string
    • Description: Title given to device by admin through the ArborXR Web Portal
  • getDeviceSerial()

    • Return Type: string
    • Description: Serial assigned to device by OEM
  • getDeviceTags()

    • Return Type: string array
    • Description: Tags added to device by admin through the ArborXR Web Portal
  • getOrgId()

    • Return Type: string
    • Description: The UUID of the organization where the device is assigned. Organizations are created in the ArborXR Web Portal.
  • getOrgTitle()

    • Return Type: string
    • Description: Name assigned to organization by admin through the ArborXR Web Portal
  • getOrgSlug()

    • Return Type: string
    • Description: Identifier generated by ArborXR when admin assigns title to organization
  • getMacAddressFixed()

    • Return Type: string
    • Description: physical MAC address assigned to device by OEM
  • getMacAddressRandom()

    • Return Type: string
    • Description: randomized MAC address for the current WiFi connection
  • getIsAuthenticated()

    • Return Type: boolean
    • Description: whether the device is SSO authenticated
  • getAccessToken()

    • Return Type: string
    • Description: the SSO access token
  • getRefreshToken()

    • Return Type: string
    • Description: the SSO refresh token
  • getExpiresDateUtc()

    • Return Type: datetime
    • Description: when the SSO access token expires in UTC time

Example Unity Script

using XRDM.SDK.External.Unity;

public sealed class ExampleScript : SdkBehaviour
{
  protected override void OnEnable()
  {
    base.OnEnable();
    base.Connect(new SampleCallback());
  }
  
  private sealed class SampleCallback : IConnectionCallback
  {
    public void OnConnected(ISdkService service)
    {
      var deviceId = service.GetDeviceId();
    }
    
    public void OnDisconnected(bool isRetrying) { }
  }
}

Last modified March 21, 2024: Removing trackUserExperience (a747cd9)