Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble undersstanding how to use a specific version of ARCore in Unity project and relationship with the Google Play Services for AR #175

Open
tsoen opened this issue Jan 10, 2025 · 4 comments
Labels
feature-feedback Feature feedback

Comments

@tsoen
Copy link

tsoen commented Jan 10, 2025

Summarize your feature feedback
Hello,

I am trying to make use of the new Flash Torch management using ARCore introduced in v10.27.3.
I followed the instructions here (https://developer.vuforia.com/library/platform-support/using-arcore-vuforia-engine#manually-include-arcore), added the arcore_client.aar (v1.47.0) and unchecked Include ARCore Library

During Vuforia initialization, I got this error :

Found and imported ARCore library.
ARCore version installed on device: 1.38.231530493
ARCore is not available to Vuforia, it reports that the installed version is too old.

I checked for the Google Play Services for AR on the device, and indeed it was not up-to-date.
After updating it, everything works fine :

Found and imported ARCore library.
ARCore version installed on device: 1.47.243160293
ARCore Version: SDK build name: 1.47
ARCore Version: APK version code: 243160293

However this situation left me a little bit confused.

This means that if we include the latest ARCore library (.aar) into our app, but the user did not recently update the Google Play Services for AR on his tablet, Vuforia will be completely unusable ?
If that's the case, how can we "catch" this error and inform the user that he needs to update it himself ?
Or even, what would happen if the latest version of Google Play Services for AR is not supported on the device ? The user could not update it and Vuforia would not work because our app would be using an ARCore library that is too recent.

Also, when checking the Include ARCore Library in VuforiaConfiguration, we can see that used version is 1.36.0.
Why is the included version of the ARCore library 1.36.0 and not at least 1.45 (necessary for the new Flash Torch management) ?

Business impact
Vuforia would not work at all for some users with no clear indication on why, if we decide to specify a recent version of the ARCore library.

Workaround
No

Additional context
Also I hoped that adding the ARCore library manually would remove the need for the Google Play Services for AR application to be installed, but this is probably off-topic. (We have users using tablets under a very restricted network, and the Google Play Store is not available to download the Google Play Services for AR app, we have to manually add the APK to the private store of these tablets).

@tsoen tsoen added the feature-feedback Feature feedback label Jan 10, 2025
@ptc-emaggio
Copy link
Collaborator

ptc-emaggio commented Jan 13, 2025

hi @tsoen thanks for the inquiry, your issue is somewhat related to this other one. I will try to clarify a few points:

  • Not all Vuforia Engine SDK feature require ARCore. Most features benefit from ARCore but it is mandatory only for AreaTargets, Ground Plane and a few other edge cases. If ARCore is not installed Vuforia will fall back to its own environment tracking (if possible).
  • The ARCore library the app is built against is only a thin shell, does not include the tracking algorithms, and only provides some minimal functionality to check if Google Services for AR are installed and optionally trigger installation.
  • Engine SDK does not ask for ARCore installation we leave this to the app (or Unity). If you set ARCore as required and Google Services are not installed, these will be installed together with the app. However there are some edge cases (like the user manually uninstalling the AR services) which are not covered by this mechanism.
  • As discussed in this other thread to be 100% sure the device has the necessary version of ARCore the app has to call on every initialization this ARCore API. We do not do it "yet" and this is the reason why we still set the minimum ARCore version to 1.36.

@tsoen
Copy link
Author

tsoen commented Jan 16, 2025

Hello @ptc-emaggio

Thank you for the clarifications.

I was able to use the ARCore API to detect if ARCore needed to be installed or updated on the device, if supported.

There is one last case that I have trouble supporting:
If the user has not logged in on a Google account on the device or if the Google Play Store has a whole is blocked (by the device and/or by the proxy), the ArCoreApk.getInstance().checkAvailability will return UNKNOWN_ERROR.

As I said before, on one platform we have to sideload the ARCore APK to our private store.
However since the availability check does not give us any useful information, we have no way to inform the user that he may have not updated the ARCore APK through our private store.

I have seen in the Vuforia / LogCat logs that you managed to get the actual ARCore version installed on the device (or 0 if not installed) : ARCore version installed on device: 0

Could you please tell me how you got that information ?

Regards

@tsoen
Copy link
Author

tsoen commented Jan 16, 2025

Following up on previous comment, what I would need is :

  • version of ARCore APK installed on device, if any
  • version of ARCore SDK bundled with our app

This way I could compare the 2 versions manually (if ARCore cannot do it itself because of the reasons listed above) and inform the user if necessary.

I believe this is something that you aare already doing :

ARCore version installed on device: 0
ARCore library built into app: f3ba394ebe6d3c542ee11e6cabaec8af
This version of ARCore does not support flash control, upgrade to a version >=1.45.

Thanks

@ptc-emaggio
Copy link
Collaborator

Hi @tsoen

We get the installed ARCore information from the PackageManager (https://developer.android.com/reference/android/content/pm/PackageManager) retrieving the PackageInfo for the ARCore package.

Regarding the version bundled with the app we do not have access to the version but we only report a hash computed from the libarcore_sdk_c.so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-feedback Feature feedback
Projects
None yet
Development

No branches or pull requests

2 participants