Android webcam lag when opening Native dialogs (Android Keyboard, etc)

Hello, I am facing a game breaking issue in Android for an Augmented Reality game we are currently developing.

Everytime an Android native dialog is opened (for example, the Android Keyboard) the camera frame rate starts dropping radically, even though the game is running at an expected frame rate (this issue does not happen at all in iOS). The frame rate goes lower and lower the more the native dialogs are opened. Also, sending the app to the background (through the home button) and back brings to camera feed to a normal frame rate.

Even though we are using the Vuforia SDK for AR, this problem seems to come from the Unity Engine as reported in this issue: Unity Issue Tracker - [Android] InputText makes webcam update texture slow

I also noticed that the above issue state changed from Fixed to Active. Is there any update from Unity on this fix?

There seems to be a fork of bug reports with very different states: Unity Issue Tracker - [Android] Camera texture becomes slow when using Input field with Multithreaded Rendering turned off
Unity Issue Tracker - [Android] Camera lags when using Vuforia plugin and input field

So far, every forum post or reported bug has a lot of people facing this issue for quite some time (seems to start from October 2016) with no solution or workaround available.

We are using Unity 5.6.0f3

1 Like

Hi I am also facing same issue did you get any idea on this?

1 Like

Hello, unfortunately there is still no proper solution for this issue. You can find more information about it here: https://developer.vuforia.com/forum/issues-and-bugs/camera-lags-android

Summary:

  • Issue has to do with anything overlaying your Unity app
  • Putting the app to the background then back, solves the camera lag
  • It is a Unity bug with handling Android activities
  • Supposedly it has been fixed by Unity but not released yet
1 Like