I am trying to view SurfaceTextures
in TextureView
, i am getting SurfaceTextures
from a callback
@Override
public void onNewTexture(SurfaceTexture texture) {
Log.d(TAG, "On New Texture");
runOnUiThread(new Runnable() {
@Override
public void run() {
textureView.setSurfaceTexture(texture);
}
});
texture.detachFromGLContext();
});
above code snippet displays only First texture and after that textureView
freezes (like image below)
some of the logs while application is freezed state are attached here
i wanted to know is it the right way to view SurfaceTexture
in android if yes , what is the problem with above code ,
i am quiet new to this area of android and spent day together , any help or clue related this problem will be big help for me