Permissions

Understand how to handle device permissions required for some ARDK features.

Feature

Required Permissions

Notes

ARSession

Camera

On Android, permission must be requested and granted before calling ARSessionFactory.Create or else the method will return null. On iOS, permission will be requested when the ARSession is first run.

Location Services

(Fine) Location

The ILocationService.StatusUpdated event will surface failures to start location services if missing permissions.

Multiplayer

Local Network

Required on iOS only. The multiplayer (MultipeerNetworking and ARNetworking) classes use peer-to-peer UDP connections in order to send low-latency messages.

Note

The VPS Wayspot Anchors feature depends on running both the ARSession and LocationService features, and thus requires all permissions required by those features.

Requesting Permissions

While iOS permissions are automatically requested by the platform the first time a feature requiring that permission is started, Android permissions must be requested somewhere in your application code. ARDK’s PermissionRequester API wraps around Unity’s Android Permissions API to provide both async/await and callback options for methods to request permissions.

To enable greater control over when/how to request permissions on both Android and iOS, a platform-agnostic permission requesting API is in development.