Surface View front camera issue

Hello,
everyone i am using surface view for my app. i am facing issue on front camera. it shows black screen in but when u minimize the app and reopen it it shows the camera view. any solution on how to fix it or what i am doing wrong.
image

Hello,

does noone know how to fix it ?

Please wait patiently for a reply instead of spamming.

replying once in 24hr is not spamming