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

com.google.ar.core required breaks ArCoreApk.getInstance().checkAvailability(context) #1271

Closed
abbana opened this issue Jul 20, 2021 · 2 comments
Labels

Comments

@abbana
Copy link

abbana commented Jul 20, 2021

SPECIFIC ISSUE ENCOUNTERED

When "com.google.ar.core" ="required"
ArCoreApk.Availability availability = ArCoreApk.getInstance().checkAvailability(this);
returns UNKNOWN_ERROR

When "com.google.ar.core" ="optional"
ArCoreApk.Availability availability = ArCoreApk.getInstance().checkAvailability(this);
returns SUPPORTED_INSTALLED

VERSIONS USED

  • Android Studio: 3.5.2
  • ARCore SDK for Android: implementation 'com.google.ar:core:1.25.0'
  • Device manufacturer, model, and O/S: Samsung SM-991B
  • Google Play Services for AR (ARCore): Installed, latest
  • Output of adb shell getprop ro.build.fingerprint: samsung/o1sxeea/o1s:11/RP1A.200720.012/G991BXXU3AUF6:user/release-keys

STEPS TO REPRODUCE THE ISSUE

See above

WORKAROUNDS (IF ANY)

None

ADDITIONAL COMMENTS

Need this to work as the app is Arcore Required

@abbana abbana added the bug label Jul 20, 2021
@abbana abbana closed this as completed Jul 20, 2021
@abbana
Copy link
Author

abbana commented Jul 20, 2021

Using workaround

@inio
Copy link

inio commented Apr 14, 2022

This issue was just discovered during some internal testing, and I'm surprised that this is the only public report of it that I can find. It likely affects any side-loaded AR Optional app with targetSdkVersion of at least 30 on a device running at least Android 11. Apps installed through the Play Store will not experience this issue.

As an immediate fix, please try adding this to your app manifest (at the top level within the <manifest> block):

  <queries>
    <package android:name="com.android.vending" />
  </queries>

If you already have a <queries> block add just the <package ...> element to it.

This should be fixed in a future release of the ARCore SDK by incorporating the above snippet into the ARCore AAR..

P.S. The reason optional vs. required created different behavior is that the SDK assumes that apps marked required at the manifest level will only be installed on supported devices.

P.P.S. No, I'm not really back. I just got roped in to the debug of this because I was the one that built it.

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

No branches or pull requests

2 participants