On Snapdragon and Exynos devices, face tracking works but black screen but on MediaTek devices everything works fine. + Face Tracking + Android

I made an app using Unity to track the face and put glasses on it. When I tested it on Huawei Y6 prime 2019, it worked fine but when I tested it on other devices faced this issue.
Here is what happened exactly.
When I go to the AR part of the app, I see a black screen with only the glasses appearing. When I move my head, the glasses move with me as they should but still, I can’t see myself.
Here is a video of what happens:
I tested on 6 devices and here are their specs and whether they work or not:

  1. Huawei Y6 prime 2019, Mediatek MT6761 Helio A22, Android 9=> works
  2. Nokia 2.3, Mediatek MT6761 Helio A22, Android 11 => works
  3. Samsung A20, Exynos 7884, Android 11, => doesn’t work
  4. Huawei Y7 prime, Snapdragon 430, Android 8=> doesn’t work
  5. Don’t know device model, Exynos 7885, Android 10 => doesn’t work
  6. Samsung A5, Exynos 7880, => doesn’t work

For anyone who may face this problem in the future, the problem was android graphics API. To work on all devices it should be auto.

I think something as important as this should be in the documentation.

Hello @abdelaziz.y.rashed,

glad you found and fixed the issue.

I think we mentioned this at both the git repo and official doc, where it clearly states that for Android we only support OpenGL ES 2.0 and 3.0 and not Vulkan. The selection between 2.0 and 3.0 depends upon the individual project and Unity specific settings.

You may want to refer to following android developer doc to decide. For instance, it seems there’s a about 7.5% of devices which only supports ES 2.0 and 92.5% devices for ES 3.0+.

Lastly, I would point out that if you use following menu option:

Zappar>Editor>Update Project Settings To Publish

then for Android platform it selects ES 3.0 as the preferred Graphics API. The intended purpose of this menu option is to set most essential and basic editor settings (Graphics API, WebGL template, Permissions, etc.) required to successfully build for the currently active platform. Thus, we always recommend to check all relevant settings of your project manually to be sure.