I have a problem - constantly pursuing me from version to version - with receiving the Android device camera’s feed by the application.
The situation is next:
I deployed the default Handheld AR project to the Android device. It does work and receives the camera feed. I can scan the desired plane and place an object.
I used the Handheld AR template, dedicated for Android and iOS devices, and the only version that does work - 5.0.3.
The production versions like 5.1 and 5.2 are unable to provide a camera feed.
In terms of the source of the issue - I would suggest checking the materials first. I am not sure about the configuration session file, but the overlay on my screen is a texture.
I’m assuming the problem is somewhere within the materials involved. Anything related to the camera’s feed passthrough functionality. But I’m only shooting. Will be working on it soon, so, if I will be able to solve this problem - I will update the topic.
Hi, is there any way to get the feed working, I#m having the same Problem.
It is working with Unreal 5.1 but in 5.1 the media player for android is broken. it just crashes the opengl driver when playback is started.
Ar development has been pretty fustrating so far with Unreal…
The issue seems to be tied to the materials bundled with the AR template. The culprit seems to be “M_SceneDepthOcclusion” in the plugin content for ARCore. Here is the solution that worked for me:
Getting Camera/AR Working in Unreal 5.2 w/ Android
Create new Unreal Handheld AR App from template
Configure Android (Project settings)
a. Change build target to 33
b. Package game data inside apk
c. For Android SDK I used NDK 25.1, JDK 1.8/18
In Content Browser settings, be sure “Show Plugin Content” is checked
In Content Browser, search “M_SceneDepthOcclusion” and double click the material to open in editor
Break a node and then reconnect it, apply, and save material
As a side-note, the first roadblock I encountered with deploying Tabletop AR Template with v5.2 was regarding permission writing externally. Once I got around that, I was faced with this camera feed issue.
That’s odd, I still can’t seem to replicate your fix… When you say “Change build target to 33” I’m guessing you’re referring Target SDK version? I’m unsure which NDK/JDK I’m using but I’m pretty sure they’re similar.
I found the materials, is there a specific node you broke the connection to perhaps?
This is interesting…I had this working last night after I made those changes and packaged, but today when I went to rebuild for Android, I am not seeing the camera feed again. I will repeat and try to re-create this again.
I did try this solution earlier and had no positive results. And this time it did not work too. The settings are the same as you described.
The texture is associated with several basic materials and is deep inside the basics of logic. This makes debugging hard without a better understanding of the engine functionality.
Actually out of the box (using same settings as above), 5.1.1 camera feed worked after I was able to get past permissions. I didn’t have to mess with materials.
I am facing the same issue since I upgraded my game to ue 5.2 (which was necessary to meet the lastest in-game-purchase requirements for uploading to google play).
Will try setting target to 33 to see if it helps. Please let me know if you find any working solution to this.
hey guys . good news here .
i was trying on it about 1 month and finally think found the answer.
1-using UE 5.0.3 with NDK r21e (21.4), SDK minimum 26 and target 31,java 11 (you also will need java 17 )
2- go to this link and follow for install AGDE Debugging Unreal Engine Projects for Android in Visual Studio with the AGDE Plugin | Unreal Engine 5.0 Documentation
3-create an empty c++ files editor > tools > new c++ class and generate visual studio file project
4- set up your environment variable and add ‘AGDE_JAVA_Home’ to java 17 location (keep JAVA_HOME on java 11)
5- open visual studio file and set solution configuration to debug game and solution platform to android and launch it on device or emulator
u will see some errors u must fix them mine was this : platform toolset not set to MSVC visual studio 2019 (v142)
6-open project and package full project in appropriate location (not launch on device )
7-install packaged project on android device and run issue is gone and you can even change code and launch it through android device (directly)
good luck
Yes, it works in UE 5.0.3. The issue for me is that google play requires building with 5.1 or 5.2 to for in-app purchases functions to work. So my project is in 5.2 now…
In terms of the 5.2.0 production version of the engine - we are still not able to run the template or even the AR session.
In terms of the 5.1.1 production version of the engine - my project buddy solved the black screen issue with the specific SDK/NDK settings. But the engine/ARCore is constantly yelling that there is a problem with these SDK/NDK settings. And still has several other stuff - like flipped screenshots - that make the version unusable in the AR context.
In terms of the 5.0.3 production version of the engine - it does work with specific SDK/NDK settings.
The version of the SDK/NDK - is 21.1.6352462.
I don’t believe we have much more time to tinker with these versions, but in case there will be any other options/solutions - will be keeping you posted, guys.