Wowza Community

WZCamera failing on devices with only one camera

I was able to reproduce this error on a Lenovo YT3-850F (Android 5.1.1), Nexus 7 2012 (Android 5.1.1) and on a Genymotion Emulator (Android 5.0.0) with Nexus 5 configurations.

After calling

this.cameraView = (WZCameraView) root.findViewById(;

the cameraView is null, looking into your code I found that the SDK is detecting the camera like this on the Lenovo device:


camera id : 0

direction : back

available : yes

preview sizes supported : [144x176, 160x120, 176x144, 240x160, 320x240, 352x288, 384x288, 480x360, 576x432, 640x480, 720x480, 768x432, 800x480, 864x480, 1280x960, 1280x720, 1920x1080]

focus modes supported : [auto, infinity, macro, continuous-video, continuous-picture, manual]

torch supported : no


scaleMode : FILL_VIEW

viewSize : 0x0 (null)

surfaceSize : 0x0 (null)

clientFrameSize : 640x480 (4:3)

activeFrameSize : 640x480 (4:3)

surfaceRotation : 1

Object state taken from:

public WZCamera getCamera() {

return this.mActiveCamera;



So, inside the WZCamera the “lCamera Object and “mSurfaceTexture are both null.

I tracked down the reason of this and came to the startPreview() method in the WZCameraView class:

And as you can see, b() is true but still if(!this.b()) is also true and thus the entire method is returning a null WZCamera.

Screenshot of b() being executed, where mCameras.length > 0 should return true:

Objects mentioned above:

So… all this is disabling the SDK from showing or streaming any video at all, only audio. We need to get our application running on the Lenovo device and would deeply appreciate any fix or workaround for this.

Thank you! :slight_smile:


This is currently a known issue, and our Android SDK Engineers are working to provide a fix. I’ll post here again once the new release with the fix is available.



A new release of the Android SDK is now out that addresses this issue. Do please download the new SDK release from the link provided through email.


Could the single camera issue be back in latest SDK and Android GoCoder? Please see post