Asus ZenFon3, with Android 7.
Get from the checkAvailability(this) a SUPPORTED_NOT_INSTALLED but when opening arcore in the playstore to install, can't install and get the message "your device isn't compatible with this version".
The availability check should rather return a UNSUPPORTED_DEVICE_NOT_CAPABLE.
Same problem occurs for the moto g4 with android 7.
That's rather odd. Could you post a logcat?
private fun checkIsARCoreUnsupported():Boolean
{
val availability = ArCoreApk.getInstance().checkAvailability(applicationContext)
return availability.isUnsupported()
}
returns false, because the availability is SUPPORTED_NOT_INSTALLED.
Its interesting because in the log statements which are related to the arcore are:
ARCore-InstallService: Install service connected
E/ARCore-InstallService: The device is not supported.
W/ARCore-InstallService: requestInstall = -5, launching fullscreen.
E/StandardArFragment: Error: Failed to create AR session
com.google.ar.core.exceptions.UnavailableUserDeclinedInstallationException
at com.google.ar.core.InstallActivity.finish(Unknown Source)
So the behavior is still "this application requires the latest version of arcore" dialog-> continue button to open play store -> "your device isn't compatible with this version." message in the play store.
Have you side-loaded a previous version of ARCore? For better handling of areas where the Play Store servers are unavailable, we treat the presence of any ARCore APK to imply support.
Hmm okay no side-loaded verion of a previous ARCore is known as far as I know. So this means once any ar-core supporting apk is installed it will return always the state that it is supported?
no, once the ARCore APK itself is installed it will return supported. This is done because are environments where we can install ARCore but cannot contact the Google Play Store servers to determine compatibility.
Oh, I just noticed something else: Is your app marked as AR-Required? If so (for similar reasons to above) checkAvailability will always return a SUPPORTED_… code. See Enable ARCore for details on how to mark your app as Optional or Required.
Background: We assume users install applications from legitimate sources, and thus could never get an AR-Required app on an unsupported device.
@dev4711 I've been unable to reproduce this behavior. Is it possible your app is marked AR-Required?
Yes the apps(my app and justALine) I did test are ar-required.
So because I didn't know about the behavior that it always returns Supported_.. if a ar-core required app is installed I decided to go with an work around.
I implemented an check that catches an arcore not installed exception when arcore was not installed after coming back from the playstore in the sceneform arfragment.
Most helpful comment
Oh, I just noticed something else: Is your app marked as AR-Required? If so (for similar reasons to above) checkAvailability will always return a
SUPPORTED_…code. See Enable ARCore for details on how to mark your app as Optional or Required.Background: We assume users install applications from legitimate sources, and thus could never get an AR-Required app on an unsupported device.