Unity Example Package
Android 11
Windows 10
On Device
ARDK 1.3:
2020.3.28f:
Description of the issue:
Whenever deployed build to device it says: “The application requires the latest version of Google Play Services for AR” . It doesn’t ask for a camera permission, and if I skip the alert, I can run the app but it only renders the black backgroung (instead of the real world).
I have read in another similar topic to follow these instructions (启用 ARCore | Google Developers), but I am developing in Unity, and those steps are for Java. Are there any more clear instructions for solving this issue in Unity?
If you follow the steps under Building for Android 11 (API level 30) and higher, and add in the tag that’s mentioned there, that will fix the issue with the update popup appearing. Please note that since you’re on a newer version of Unity you can ignore the part about updating gradle.
Another thing to note, there’s currently a bug with ARDK and version 1.31 of Google Play Services for AR (ARCore) that affects some features. This bug also results in a black screen on the device instead of a camera feed. There’s a pending fix for this, so if you’ve affected by the issue we’ll have something to share soon.
Thanks for the info. I’m also experiecing that black screen issue, even though i added the tag mentioned in the tutorial (the alert doesn’t appear, but the screen is still black).
This is my info:
I’m creating a basic project with this guide: The Basics – Niantic Lightship
Android 11
Windows 10
On Device
ARDK 2.0
2021.3.3f
Mmmm, while i appreciate the help, this does not help ensuring that the app will run on every Android device posible, which hurts the app’s reach.
The only solution i could find without limiting the Target API was to import all of the extra packages (templates, mocks, the Lightship Hub) to the project, use the Lightship Hub to help me create the AR scene, then adding the tag mentioned in the tutorial to the generated manifest, and only that so far fixed the problems.
Thank you for your time.
P.D: i used the same settings i mentioned before: same Android version, same device, same Unity Version and same ARDK version, and the problem from before was fixed as i mentioned.
Are you adding the tag to the correct manifest? From my experience, there can be several AndroidManifest.xml files in a Unity project, and this one needs to go in the custom main manifest. I’d also double check that all permissions are allowed, and would add a permissions requester component for the camera, if there’s not one there already.
One thing that helps me out quite a bit when adding the tag is to use the “Custom Main Manifest” setting in the Publishing Settings of my Unity project. This creates an AndroidManifest.xml file automatically in the Assets/Plugins/Android directory of your Unity project. Just add the tag to that file, and you should be good to go.
@Juan this should also hopefully resolve your issue as well.
Thanks for helping, but it is not working. I added the custom manifest, which now I compare with yours and they look exactly the same. Also, I have added a permission requester, plus manually allowed the camera on the app. Still black feed on camera.
I tried one last time and after manually giving permission to the app from the phone application settings, the camera is working now. Any ideas on what is not making the app ask for permission automatically?