GuidesIssuesSupportGet API Key


We provide a helpful utility module isARSupportedOnDevice to enable our developers to check their app users' device for compatibility to support their AR experiences conditionally. This way app developers can check and render appropriate views depending on whether the device is supported by the underlying AR system.


The function has the following signature:

isARSupportedOnDevice(notSupportedCallback, supportedCallback)

(React.PropTypes.func) notSupportedCallback - Called when the device does not support AR
(React.PropTypes.func) supportedCallback - Called when the device supports AR

Per ARCore docs, in the notSupportedCallback we now return a String value between UNSUPPORTED, UNKNOWN or TRANSIENT. If ARCore returned TRANSIENT, the application should check back again soon for an updated state value.

Example Use:

To take advantage of this utility, simply import ViroUtils on top of your scene and create an alias to the function like below:

import {
} from 'react-viro';

var isARSupportedOnDevice = ViroUtils.isARSupportedOnDevice;

Then, wherever in your scene you want to show a Viro AR Scene, you can check for AR support. For example, in the following snippet, we make this check in componentWillMount(). This way we know what to render based on compatibility:

componentWillMount() {
    isARSupportedOnDevice(this._handleARNotSupported, this._handleARSupported);
  _handleARSupported() {
    console.log("AR supported");
  _handleARNotSupported(reason) {
    console.log("AR not supported, with reason: " + reason);