SurfaceView unable to show camera feed using the front camera


  1. Whenever i click on “start button”, to start the Surfaceview, it appears as a black screen.

Anyone experiencing similar outcomes??

Kindly advise @KodularCreator


Is your :camera: covered or do it have any problem?? And is the issue is only on one mobile ???
And why is your surface view so small??
Attach am so that others can test

My camera is not covered.

I have tested it on the following devices:

  1. Samsung Tab A 10" (Octa-core, 1.4 GHz 1.6GHz ,2GB RAM)

  2. Samsung J2 CORE (Quad-core 1.4 GHz, 1GB RAM)

  3. X-TIGI Joy Tab 10 (1.1GHz, 2Gb RAM)

SurfaceView_Test_Screen1.ais (2.4 KB) SurfaceView_Test.aia (1.6 KB)

What are sizing of surface view?
Use fill parent in both width and height

1 Like

check out this apk file and tell if it works?
SurfaceView_Test.apk (4.6 MB)

Sorry, I typed this message hours ago but it wasn’t sent, don’t know why:sweat_smile:

It still does not show the camera feed.

However, when the orientation of the screen changes to landscape and back to portrait, then the feed shows.

This is occurrence is not as a result of the size of the surfaceview because small surfaceview also act in the same exact way.

NB: I am testing this on a Samsung Tab A 10.0"

Can you test it on another device and see if the same problem occurs?

Actually now that I’ve tested it the same thing happens to me as well.

Works well with me Android 7.1.1
SurfaceView unable to show camera feed using the front camera

1 Like

Do the app have camera access granted??


Both camera and storage is granted.

What is the spec of your device?

Screen size?

1 Like

Are you using the front camera?

If yes, stop and start it. Report how the system behaves.

I am beginning to see a trend with regards to this problem.

Hypothesis: Surfaceview front camera works well on Android 7.

I have just tested with another device with Android 7 and it works.

My other test devices are Android 8 and 9.

@alrmailay @Nikthegreek @Deepanshu_Arya @KodularCreator I am encouraging everyone to test this new hypothesis.

well i understand your concern, tagging the people joined in the conversation is fine but you also tagged 7 more people:sweat_smile:!. tagging people like this is not in favor of community, next time be careful

i am currently testing

i dont have device with those OS but tested here:

and it worked

I have tried the rear camera only

The problem is with the front camera. Test that instead.