arfoundation-samples icon indicating copy to clipboard operation
arfoundation-samples copied to clipboard

Checking for Device Support is invalid

Open Leiong opened this issue 6 years ago • 2 comments

Unity:Unity2018.4.14f1 ARFoundation:1.50-preview.7 ARCoreXRPlugin:2.20-Preview.6 Device: MI 5

The check code is as follows:` public class MyComponent { IEnumerator Start() { if (ARSession.state == ARSessionState.None ||ARSession.stateARSessionState.CheckingAvailability) { yield return ARSession.CheckAvailability(); }

    if (ARSession.state == ARSessionState.Unsupported)
    {            
         Debug.Log("Unsupported");
        // Start some fallback experience for unsupported devices
    }
    else
    {
         Debug.Log("Supported");
        // Start the AR session
    }
}

} `

Leiong avatar Jan 02 '20 02:01 Leiong

0200102101955

MI5 phones do not support AR, but they cannot be checked out correctly. This is just an example. I also checked with other equipment. the problem still exists.

Leiong avatar Jan 02 '20 02:01 Leiong

This is the expected behavior when ARCore is "required" (the default). This is because you would not normally be able to install an ARCore required app on an unsupported device, so ARCore assumes if you are running an app that requires ARCore, then the device is supported. By building and deploying from Unity, you are "side loading" your apk and circumventing this restriction.

See also the ARCore docs on this. In the ARCore XR Plugin package, you can specify that ARCore is "optional" to support a fallback experience on unsupported devices.

tdmowrer avatar Jan 22 '20 16:01 tdmowrer